Dealing with NULL values through OLEDB

I have a Microsoft Access 2019 database and have a process external to the Access database that pulls some data and processes the data to email a summary to end users in my company. The process has been running for years without a problem. A few months back the external process

I have a Microsoft Access 2019 database and have some data that I need to display on an internal website page. About few years ago, I created a main query that pulls together data from a number of tables. In order to get at the data I needed, I had to create some sub-queries that summarize some data to "feed" the main query.

To display the data on the web page I am using OLEDB and executing the main query. The connection string I am using is "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=D:\xxxxx.accdb;" The query I execute is "select * from Budgets".

For years this worked fine but then I started getting "invalid use of NULL" errors. When investigating, I found some columns in the access database that indeed contained NULLS that shouldn't have. I fixed those and everything was good again. A few months back I started getting those errors again. I checked the columns that were the problem before but all is good. Access does not give any clues as to what is causing the error. I suspect something in the sub-queries but without any clues I have not found anything. I have revisited this problem again and again looking at different things and searching the web for new things to look at and try but have found nothing so far.

Note that the main query and sub-queries all run without errors when run from within Microsoft Access. The "invalid use of NULL" errors only happen when accessing from outside of Access.

Any help would be immensely appreciated.

Thanks in advance,
Chuck R.

0 answers