cdaoworkspace 
Author Message
 cdaoworkspace

hi, i'm trying to load a database which has passwords, i have set the
database password, and also user accounts and passwords, i wan't to load
this with cdaodatabase, so i set the default user and password to those
obtained from a dialog box, however, if i type in anything for the password
it doesn't work, if i type nothing it loads the database and says the
password is no good, but if i type a password i get this message

Can't start your application. The workgroup information file is missing or
opened exclusively by another user.

here is my code:

 CLoginDlg dlgLogin;
 dlgLogin.DoModal();
 CDaoWorkspace::SetDefaultUser(dlgLogin.m_strUser);
 CDaoWorkspace::SetDefaultPassword(dlgLogin.m_strPassword);

 // create a file dialog to select database
 CFileDialog dlgFile(TRUE, "", "*.mdb");
 if(dlgFile.DoModal() != IDOK)
 {
  return FALSE;
 }

 m_strDBName = dlgFile.GetFileName();

 // open the database using the filename from dlgFile
 try
 {
  m_dbData.Open(dlgFile.GetFileName());
 }



Tue, 13 Feb 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. CDaoWorkspace::RepairDatabase crash

2. Problem creating a new CDaoWorkspace with user other than Admin

3. CDaoWorkspace.CompactDatabase

4. CDaoWorkspace and Transactions - Problem

5. CDaoWorkspace* as member variable property type.

6. CDaoWorkspace problem?

7. CDaoWorkspace and Jet 4.0

8. Error while creating the CDaoWorkspace

9. Using CDaoWorkspace::RepairDatabase

10. Q: CDaoWorkspace::CompactDatabase

11. CDaoWorkspace::CompactDatabase

12. What does CDaoWorkspace::RepairDatabase really do?

 

 
Powered by phpBB® Forum Software