Hi everyone,
An Access database that we have developed doesn't work properly on a few computers in the company which use Windows 7, and we haven't been able to find any difference between the installed related software on those computers with Windows 7 where it works and those where it doesn't. All computers have the same release version of Office (1806), etc.
The error we get is a a run time error: -2147467259, as soon as the code that is trying to connected to the SQL Server database is launched.
The problem doesn't seem to appear in every release we make, though, but in most. Sometimes just doing some random changes in the database like compacting it or temporarily changing a line of code and changing it back exactly as it was can make a broken version work, and vice versa.
Today I attempted to take a working version of the database and compile it to ACCDE on one of the computers with problems, and then it worked on these few computers with the problem, but then instead it didn't work on any other users' computers (regardless of Windows 7 or Windows 10).
The code causing the error is the rs.Open line below (the SQL code itself doesn't seem to have any bearing on the error):
The connection string and SQL server password are passed by functions as can be seen. The connection string looks like this:
Once we were trying to put the connection string and password directly without functions, and we had the same error. Then we tried changing back to the function, and it suddenly worked. Another line which had the code directly, though, wouldn't work.
This all looks to me like some sort of bug somewhere, but we have no idea where if so.
Does anyone have any idea what could be causing this problem and/or a way to circumvent it (short of attempting to reinstall Windows 7 or Office or upgrading to Windows 10)?
Thank you
An Access database that we have developed doesn't work properly on a few computers in the company which use Windows 7, and we haven't been able to find any difference between the installed related software on those computers with Windows 7 where it works and those where it doesn't. All computers have the same release version of Office (1806), etc.
The error we get is a a run time error: -2147467259, as soon as the code that is trying to connected to the SQL Server database is launched.
The problem doesn't seem to appear in every release we make, though, but in most. Sometimes just doing some random changes in the database like compacting it or temporarily changing a line of code and changing it back exactly as it was can make a broken version work, and vice versa.
Today I attempted to take a working version of the database and compile it to ACCDE on one of the computers with problems, and then it worked on these few computers with the problem, but then instead it didn't work on any other users' computers (regardless of Windows 7 or Windows 10).
The code causing the error is the rs.Open line below (the SQL code itself doesn't seem to have any bearing on the error):
Code:
Dim rs As Object
Set rs = New ADODB.Recordset
rs.Open "[SQL CODE]", getCS() & Decrypt(getPW()), adOpenForwardOnly
The connection string and SQL server password are passed by functions as can be seen. The connection string looks like this:
Code:
"Provider=SQLOLEDB;SERVER=[SERVERNAME];DATABASE=[DBNAME];UID=[ID];PWD="
Once we were trying to put the connection string and password directly without functions, and we had the same error. Then we tried changing back to the function, and it suddenly worked. Another line which had the code directly, though, wouldn't work.
This all looks to me like some sort of bug somewhere, but we have no idea where if so.
Does anyone have any idea what could be causing this problem and/or a way to circumvent it (short of attempting to reinstall Windows 7 or Office or upgrading to Windows 10)?
Thank you