By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,426 Members | 1,721 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,426 IT Pros & Developers. It's quick & easy.

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

P: 393
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
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 374

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
May 6 '12 #2

Post your reply

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