
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!