Error compacting a password-protected Access database 
Author Message
 Error compacting a password-protected Access database

Hi all,

I have an Access database with a password ABCDEFGH.  In my Visual C++ 5
application, I have the following line:

CDaoWorkspace::CompactDatabase(_T("C:\\MyDB.mdb"), _T("C:\\Temp.mdb"),
  dbLangGeneral, 0, _T("ABCDEFGH"));

This line throws an exception "Couldn't find installable Isam" (error
code 3170).

If I remove the password from my database, and do this:

CDaoWorkspace::CompactDatabase(_T("C:\\MyDB.mdb"), _T("C:\\Temp.mdb"),
  dbLangGeneral, 0, _T(""));

it works fine.

Can anyone help me with this?

Thanks in advance...

-Eric Harmon



Sat, 20 Jan 2001 03:00:00 GMT  
 Error compacting a password-protected Access database
Eric,

This is the code I use. The difference is subtle.

CDaoWorkspace::CompactDatabase(pathName,newName,
dbLangGeneral,0,";PWD=mypassword") ;

Good Luck,

Craig Klementowski

Quote:

>Hi all,

>I have an Access database with a password ABCDEFGH.  In my Visual C++ 5
>application, I have the following line:

>CDaoWorkspace::CompactDatabase(_T("C:\\MyDB.mdb"), _T("C:\\Temp.mdb"),
>  dbLangGeneral, 0, _T("ABCDEFGH"));

>This line throws an exception "Couldn't find installable Isam" (error
>code 3170).

>If I remove the password from my database, and do this:

>CDaoWorkspace::CompactDatabase(_T("C:\\MyDB.mdb"), _T("C:\\Temp.mdb"),
>  dbLangGeneral, 0, _T(""));

>it works fine.

>Can anyone help me with this?

>Thanks in advance...

>-Eric Harmon



Sat, 20 Jan 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How to compact a password protected database with Visual C++ using ODBC

2. How to compact a password protected database with Visual C++ using ODBC

3. repairing and compacting a password protected ODBC Access db

4. Open a password-protected Access database

5. SQLConfigDataSource and password protected ACCESS database

6. Password protected Access Database

7. Compacting A password protected mdb

8. DAO Error 3170 with pwd-protected Access database

9. Database password is slapped on when compacting from ODBC DSN

10. Password Protected DataBase

11. Password protected DataBase

12. Open a password protected DataBase

 

 
Powered by phpBB® Forum Software