Currently I'm working on an Access Database Application which was using ODBCDirect. After upgrading to Access 2010 I receive an error message that told me that ODBCDirect isn't supported anymore and that I have to change from the DAO to ADO in the corresponding source code parts each time I'm running the application. I found out that the origin of this error message was the source code that was responsible for the database connection which was making use of ODBCDirect.
I followed the tutorials about ADODB.Connection objects and the opening of them. I changed this code to the following simple code by using the ADODB.Connection object.
Now I'm receiving the new error message "(-2147467259) operation is not supported for this type of object".
I found out that the place where I was using the Open function of the ADODB.Connection Object is causing the new error message:
Global conWork As ADODB.Connection
...
Set conWork = New ADODB.Connection
...
conWork.ConnectionString = "ODBC;DRIVER={SQL Server};SERVER=someServer.x.y.z;Provider=Microsoft.ACE.OLEDB.12.0;UserID=user;Password=pw;Data Source=someServer.x.y.z; Trusted_Connection=yes;"
...
conWork.Open //...causes the error msg "OPERATION IS NOT SUPPORTED FOR THIS TYPE OF OBJECT"
In the vba editor I have the Microsoft ADO 2.8 Library and the Microsoft ADO 2.8 RecordSet Library selected in the references-settings.