Link to home
Start Free TrialLog in
Avatar of PMH4514
PMH4514

asked on

CDatabase - open file without ODBC setting?

Hello

I have an MFC application that uses an MS Access database configured via ODBC.

I use CDatabase, and call OpenEx(..) passing to it the connection string which specifies the name of the ODBC entry.. All standard stuff, works just fine.

I am working on an import utility (runs without user interaction) and need to be able to create a CDatabase instance, but instead of using an ODBC entry, I have a specified path to an Access MDB file.  

How can I create this connection to a specified MS Access file without having to modify or create an ODBC setting? (note I mentioned this utility runs without user interaction, so not specifying a connection and prompting a "locate data source" dialog is not appropriate.)


thanks
ASKER CERTIFIED SOLUTION
Avatar of alb66
alb66
Flag of Italy image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of PMH4514
PMH4514

ASKER

Thanks!