|
Access was used more than a year ago.At that time, several fields were established in the database for future upgrades.
These four fields of ABCD were not used at the time, so the code of these fields was not written when writing the data. Now, these fields need to be enabled because of the upgrade. An error will occur because the record is empty. So at the beginning of the program, add the following code,
sql_.Format ("select * from customer management where IsNull [A]");
_bstr_t sql = sql_;
theApp.m_pRs = theApp.m_pCon-> Execute (sql, NULL, adCmdText);
while (! theApp.m_pRs-> adoEOF)
{
theApp.m_pRs-> Fields-> GetItem ("a")-> PutValue ("");
theApp.m_pRs-> Fields-> GetItem ("b")-> PutValue ("");
theApp.m_pRs-> Fields-> GetItem ("c")-> PutValue ("");
theApp.m_pRs-> Fields-> GetItem ("d")-> PutValue ("");
theApp.m_pRs-> Fields-> GetItem ("e")-> PutValue (renshishijian1);
// theApp.m_pRs-> Update ();
theApp.m_pRs-> MoveNext ();
}
But the SQL statement was not written correctly, and no relevant code was found on the Internet.
sql_.Format ("select * from customer management where A IsNull"); It is not correct to write this, please enlighten. |
|