|
@@ -75,7 +75,6 @@ namespace OTSSQLITE
|
|
|
{
|
|
|
return CDBQueryBasePtr();
|
|
|
}
|
|
|
-
|
|
|
auto query = datastorePtr->QueryByTableName(sTableName, a_sOrderColumnName);
|
|
|
ASSERT(query);
|
|
|
if (!query || !query->IsValid())
|
|
@@ -83,7 +82,6 @@ namespace OTSSQLITE
|
|
|
LogErrorTrace(__FILE__, __LINE__, _T("Invalid table(%s) query command."), (LPCTSTR)tableInfoPtr->GetTableName());
|
|
|
return CDBQueryBasePtr();
|
|
|
}
|
|
|
-
|
|
|
// do the table related valid checking
|
|
|
auto cols1 = query->GetColCount();
|
|
|
auto cols2 = tableInfoPtr->GetColumnCount();
|
|
@@ -91,7 +89,15 @@ namespace OTSSQLITE
|
|
|
{
|
|
|
LogErrorTrace(__FILE__, __LINE__, _T(sTableName+":Invalid table columns(%d): should be %d"), query->GetColCount(), tableInfoPtr->GetColumnCount());
|
|
|
}
|
|
|
-
|
|
|
+ for (int i = 0; i < cols1; i++)
|
|
|
+ {
|
|
|
+ if (query->GetColName(i) != tableInfoPtr->GetColumnName(i))
|
|
|
+ {
|
|
|
+ AfxMessageBox(_T("The format of the zero element rule is incorrect. Please use the standard library editor to adjust and try again!"));
|
|
|
+ LogErrorTrace(__FILE__, __LINE__, _T("The format of the zero element rule is incorrect."));
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
return query;
|
|
|
}
|
|
|
CDBQueryBasePtr CSQLiteDB::GetCommandStringQuery(LPCTSTR a_commandStr /*= nullptr*/)
|