|
@@ -84,23 +84,23 @@ BOOL CDataImpl::Open()
|
|
return FALSE;
|
|
return FALSE;
|
|
}
|
|
}
|
|
|
|
|
|
- INT nResult = sqlite3_open(strPath.c_str(), &m_psqlite3);
|
|
|
|
- if ( nResult != SQLITE_OK )
|
|
|
|
|
|
+ int sqlite_error = sqlite3_open(strPath.c_str(), &m_psqlite3);
|
|
|
|
+ if ( sqlite_error != SQLITE_OK )
|
|
return FALSE;
|
|
return FALSE;
|
|
|
|
|
|
// ´´½¨±í;
|
|
// ´´½¨±í;
|
|
char* psqlite_error = NULL;
|
|
char* psqlite_error = NULL;
|
|
if ( !QueryTable("DebugOrder"))
|
|
if ( !QueryTable("DebugOrder"))
|
|
{
|
|
{
|
|
- sqlite3_exec(m_psqlite3, _CREATE_ORDER_, NULL, NULL, &psqlite_error);
|
|
|
|
- GLOBAL::WriteTextLog(_T("sqlite3 error:%s,%s"),_CREATE_ORDER_, psqlite_error);
|
|
|
|
|
|
+ sqlite_error = sqlite3_exec(m_psqlite3, _CREATE_ORDER_, NULL, NULL, &psqlite_error);
|
|
|
|
+ if (sqlite_error != SQLITE_OK) GLOBAL::WriteTextLog(_T("sqlite3 error:%s,%s"),_CREATE_ORDER_, psqlite_error);
|
|
FREE_MSG;
|
|
FREE_MSG;
|
|
}
|
|
}
|
|
|
|
|
|
if ( !QueryTable("DebugSN"))
|
|
if ( !QueryTable("DebugSN"))
|
|
{
|
|
{
|
|
- sqlite3_exec(m_psqlite3, _CREATE_SN_, NULL, NULL, &psqlite_error);
|
|
|
|
- GLOBAL::WriteTextLog(_T("sqlite3 error:%s,%s"),_CREATE_SN_, psqlite_error);
|
|
|
|
|
|
+ sqlite_error = sqlite3_exec(m_psqlite3, _CREATE_SN_, NULL, NULL, &psqlite_error);
|
|
|
|
+ if (sqlite_error != SQLITE_OK) GLOBAL::WriteTextLog(_T("sqlite3 error:%s,%s"),_CREATE_SN_, psqlite_error);
|
|
FREE_MSG;
|
|
FREE_MSG;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -577,7 +577,7 @@ BOOL CDataImpl::UpdateSNData(std::string strOrder,std::string strSN, std::string
|
|
strInsert.append(strDetails);
|
|
strInsert.append(strDetails);
|
|
strInsert.append("'");
|
|
strInsert.append("'");
|
|
strInsert.append(" WHERE SN ='");
|
|
strInsert.append(" WHERE SN ='");
|
|
- strInsert.append(strOrder);
|
|
|
|
|
|
+ strInsert.append(strSN);
|
|
strInsert.append("';");
|
|
strInsert.append("';");
|
|
|
|
|
|
char* psqlite_error = NULL;
|
|
char* psqlite_error = NULL;
|