Compile software MSDEV3
The access2003 database software (MDB files)
1. Try many times to modify the connection string to nothing
2. Download the mdac components failed
Retrieves the hr;
Try
{
Hr=m_pConnection. CreateInstance (_uuidof (Connection));
If (SUCCEEDED (hr))
{
M_pConnection - & gt; The ConnectionString="File Name=data. Udl";
Hr=m_pConnection - & gt; Open (" ", ""," ", adConnectUnspecified);
If (FAILED (hr))
{
AfxMessageBox (" open file!" );
Return TRUE;
}
}
The else
{
AfxMessageBox (" createinstance of Connection fail!" );
Return TRUE;
}
}
Catch _com_error (e)
{
_bstr_t bstrSource (e.S ource ());
_bstr_t bstrDescription (e.D escription ());
AfxMessageBox (bstrSource + bstrDescription);
Return TRUE;
}
InitListCtr ();
CodePudding user response:
Are doing with vs2015, then ado database accessCodePudding user response:
A few years ago, when asked this question a lot, then the ADO component upgrade, GUID changeYour code to use the GUID with system do not match the GUID registered, so no registered
You can copy ADO a version, and then the code into the file, so the GUID is fixed this version