472,127 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,127 software developers and data experts.

What is the equivalent of an ODBCdirect workspace in Access 2010?

dsatino
393 256MB
I have numerous applications built in Access 2000/2003 that all use ODBCdirect workspaces to access various non-Access databases. Unfortunately, ODBCdirect is 'no longer supported'in Access 2010 and when my associates get new PC's, the applications fail.

The error message says to switch from DAO to ADO. This is a little curious since ADO is dying/dead as well.

I'm hoping someone can add a little insight/best practice to my situation.
Feb 2 '11 #1
1 8132
PianoMan64
374 Expert 256MB
dsatino,

Since ODBCDirect was deprecated from MS Access 2007, and there were a lot of articles on that deprecation, the use of DAO (for MS Access Databases) and ADO (for everything else) is the preferred method, until MS Access starts using .NET. Currently right now, ADO is the most flexible to use and you can use it on anything that you want to connect too provided you have OLEDB drivers installed for that database type that you're trying to connect too.

Currently right now, Microsoft provides OLEDB connecters for MS SQL, MS Access, and Oracle. You can reference those by the DLL's that are installed for OLEDB. You can google on how to access OLEDB.

Since I use Oracle as My backend, the provider library is MSDAORA.

You would connect with something like this:

Expand|Select|Wrap|Line Numbers
  1. Dim PresCON as ADODB.Connection
  2. Set PresCON = new ADODB.Connection
  3. With PresCON
  4.      .Provider = "MSDAORA"
  5.      'use XE this is you're using the express edition, 
  6.      'or whatever name it is if using full version.
  7.      .Properties("Data Source").Value = "XE" 
  8.      .Properties("User ID").Value = "UserNameHere"
  9.      .Properties("Password").Value = "PasswordHere"
  10. End with
  11.  
May 6 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Andolino | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.