I've go a set of large applications that were developed in Visual Studio 2005 and were working fine until I tried to do maintenance in VS 2012. At the heart of the problem is the open code::
If I proceed I find that I can read the record set but can not update it. I've got Access 2007 installed on my computer. Any suggestions?Code:// The DBQ is the path and file name (fully qualified) // The driver, inside the {} is magic for the exact driver name // which can be obtained from the ODBC administrator // The UID is also available from the ODBC administrator csBuffer = "ODBC;DBQ="; csBuffer += m_csDatabasePath; csBuffer += ";Driver={Microsoft Access Driver (*.mdb)};UID=admin"; m_pTestDatabase = new CDatabase; TRY { //m_pTestDatabase->Open(NULL, FALSE, FALSE, (const char*)csBuffer); BOOL bSuccess = m_pTestDatabase->OpenEx((const char*)csBuffer); TRACE("OpenEx(%s) returned %s\n", csBuffer, bSuccess ? "true" : "false"); } CATCH(CDBException, except) { csBuffer += "\nODBC "; csBuffer += except->m_strError; EndWaitCursor(); AfxMessageBox(csBuffer, MB_OK | MB_ICONSTOP); delete m_pTestDatabase; m_pTestDatabase = NULL; return true; } END_CATCH; and:: // default options permit read, write, and append m_pTblPlot->Open(CRecordset::snapshot, NULL, CRecordset::none); if( !m_pTblPlot->CanUpdate() ) { AfxMessageBox("SS Plot Specification database cannot be updated.", MB_OK | MB_ICONSTOP); }




Reply With Quote
