CDaoDatabase::Open() will not open mdb file 
Author Message
 CDaoDatabase::Open() will not open mdb file

I am running MDAC 2.1 SP2 and calling the Open() function from my
CDaoDatabase object, passing it the file name, extension and path as the
string argument.  It will not open my file but rather will open the Data
Source Select dialog box.  What am I not doing?  Thanks for any help, God
Bless in Jesus strong name!


Sun, 14 Apr 2002 03:00:00 GMT  
 CDaoDatabase::Open() will not open mdb file
use the following code:

CDaoDatabase db;                //Create db object as CDaoDatabase
CDaoRecordset rs(&db);              //Create rs object as CDaoRecordset
                                //using db as the reference

db.Open("c:\\blah\\blah\\test.mdb");

blah...
....
...
...
db.Close();

or you can use this:

CDaoDatabase db;
CDaoRecordset rs(&db);

CString mystring = "c:\\blah\\blah\\test.mdb";

db.Open(mystring);

Geno

On Wed, 27 Oct 1999 13:50:11 -0400, "Dana L. Stille"

Quote:

>I am running MDAC 2.1 SP2 and calling the Open() function from my
>CDaoDatabase object, passing it the file name, extension and path as the
>string argument.  It will not open my file but rather will open the Data
>Source Select dialog box.  What am I not doing?  Thanks for any help, God
>Bless in Jesus strong name!



Sun, 21 Apr 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. CDaoDatabase can not open Access2k's MDB file

2. CDAODatabase::Open fails when trying to open 2nd mdb

3. Previously opened project files not opened on startup

4. *.MDB file open exception???(Unrecognized file format...)

5. Catch() not catching error during CDaoDatabase.Open()

6. (Q) CDaoDatabase Open not failing or succeeding!

7. Can't open file using CDaoDatabase

8. A problem about open .mdb file by ADO without DNS

9. Opening a password protected MDB file using ADO

10. *.MDB file open exception???

11. Remove open handles to MDB-file

12. can't open file: to many files open

 

 
Powered by phpBB® Forum Software