DB_SEC_E_AUTH_FAILED Authentication failed.

  • Thread starter Thread starter Ngcc
  • Start date Start date
N

Ngcc

Guest
Dear,

I got a issue while upgrade my access from ".mdb" to ".accdb". would you please help me understand the issue, thanks!

The original code below:

DBPATH ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+ PATH +";Jet OLEDB:Database Password=###";


_bstr_t bstr_B;
_B.Attach( DBPATH.AllocSysString() );
try

{
m_pConnection.CreateInstance( __uuidof( Connection ) );
m_pConnection->Open( bstr_B, "", "", adModeUnknown );
}

The upgrade code below:

DBPATH ="Provider=Microsoft.ACE.OLEDB.12.0;Data Source="+ PATH +";Jet OLEDB:Database Password=###";

Both the code work successfully for my application.exe. But after upgrade to new DB Engine<ACE>, my excel interface failed to open the database while execute the code of "m_pConnection->Open( bstr_B, "", "", adModeUnknown )", got the issue is DB_SEC_E_AUTH_FAILED Authentication failed. could you please let me know how to fix the issue.

by the way, the excel interface only give the input and return the output which work successfully with the old format ".mdb", there is no any relationship with database, all the database connection are coded in DLL with C++.

Thanks a lot for your help.



Ngcc

Continue reading...
 
Back
Top