Sign in to follow this  

Problem opening .mdb files with CDaoDatabase

This topic is 4661 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi. I try to open .mdb file (MS-ACCESS 2000) with CDaoDatabase object and it fails all the time, here is my code: CDaoDatabase m_DbConnection; m_DbConnection.Open(NULL , FALSE, FALSE, "ODBC;DSN=myDB"); I get an error, something about SAMI. If I convert my .mdb to older version OF MS-ACCESS then I can open it with this code: CDaoDatabase m_DbConnection; m_DbConnection.Open("c:\\myDB.mdb"); but trying to open it with ODBC it fails...any idea how can I overcome this problem?? Thanks.

Share this post


Link to post
Share on other sites
Have you created the ODBC source in the control panel? In order to open the database with ODBC you need to create an ODBC source in the control panel.

Also, using the Access 2000 format and trying to open the file directly should work aswell.

Toolmaker

Share this post


Link to post
Share on other sites

This topic is 4661 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this