Hi,
I have an application that is running with Access 2003 under XP and it is running fine. I am upgrading it to 2010 on Windows 7 and I am getting a connection error that makes no sense. Let's me show you the code first. It's pretty simple:
Code:
adoJobRs.ActiveConnection = CurrentProject.Connection
adoJobRs.Source = strSql
adoJobRs.CursorLocation = adUseClient
adoJobRs.LockType = adLockReadOnly
adoJobRs.Open
The query that resides in strSql is a valid query. I know this because I suspended the program, queried the value of the variable in the immediate window, copied it and, after the program blew up, I created a query in the database, pasted in the query and I got a result.
The SQL is selecting data from a linked table. When I double click on the linked table, data comes up no problem.
An error -2147467259 is generated with a description of "ODBC--connection to 'CalLab' failed."
Clearly the DSN works else I would not get any data and all other queries work.
Some technical information:
1) Windows 7 64
2) Access 14.0.7015.1000 (64 Bit)
3) Microsoft Office Professional Plus 2010
I have 2 DSNs setup. One in the 32 bit admin and one in the 64bit admin (for when it was running under 32 bit office).
SQL Server 11.0.3128
I tried this with ADO 2.8 and 6.1 (recordset is 6.0).
Any assistance would be appreciated.