Cstrings DBName="Provider=Microsoft. JET. The OLEDB. 4.0. Data source=";
Cstrings STR="e: \ \ hahaha. MDB".
DBName=DBName + STR;
If (PathFileExists (STR))
{
Existing AfxMessageBox (" database ");
return TRUE;
}
Try
{
M_pCatalog=NULL;
M_pCatalog. CreateInstance (__uuidof (ADOX: : the Catalog));
M_pCatalog - & gt; Create (_bstr_t (LPCTSTR DBName));
}
The catch (_com_error & amp; E)
{
AfxMessageBox (e.E rrorMessage ());
return FALSE;
}
CodePudding user response:
M_pCatalog. CreateInstance (__uuidof (ADOX: : the Catalog));Here is to create a pointer to succeed
CodePudding user response:
Might be a permissions problem,