CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 1999
    Posts
    38

    Problem with dbEncrypt

    I'd like to encrypt files that are .mdb files which are created by my program using DAO. It seems that the only way is to use the CompactDatabase method. So I try to do :

    m_pdaoDB->m_pWorkspace->CompactDatabase( strSrcFile,
    strDestFile,
    dbLangGeneral,
    dbEncrypt,
    strPassword);

    where m_pdaoDB is a CDaoDatabase * object.

    It doesn't work. I always get a message telling me that the ISAM driver hasn't been found. Do I have to do something special when I instanciate m_pdaoDB to let the application know that I'm not dealing with any ISAM or ODBC sources but only with Microsoft Jet databases ?

    Thanks for help !



  2. #2
    Join Date
    Apr 1999
    Posts
    49

    Re: Problem with dbEncrypt

    Hi,

    the strPassword should be

    ";pwd=password"

    where password is the password you want to insert in the new database (it's optional nway)

    Marc


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured