|
-
Jun 4th, 2015, 02:35 AM
#9
Re: ADO reference
 Originally Posted by krtxmrtz
I'm using ADO to connect to an Access 2000 data base by setting a reference to 'Microsoft ActiveX Objects 6.1 Library'. Now my database has been updated to Access 2013. What reference do I have to set?
You need do download and install the appropriate ACE driver (for each computer).
Since the improvements are mainly for MS Access environment, and have no influence on the use 'outside' of the database, such as VB6 programming, it is preferable to use a database version 2003.
This work for any db version, from 2007 to 2013:
Download 2007 Office System Driver: Data Connectivity Components from Official Microsoft Download Center
https://www.microsoft.com/en-US/down....aspx?id=23734
Next you have to change your connection string as below:
Code:
Dim cn As ADODB.Connection
Set cn = New ADODB.Connection
With cn
.CursorLocation = adUseClient
.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" & strDatabasePath
.Open
End With
ADO
theoretically, you can use any ADO version, but if you deply you application keep in mind that ADO 6.x isn't supported in all Windows versions.
By me, use of ADO 2.8 it's enough, which alredy installed in all versions from Windows 2000 and above.
N.B.
It does not matter if your computer is running Office: ACE driver have to be installed anyway.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|