Here is a reason why can not log a SQL CString
Becuse the SQL CString are used by SQL server that will cloch it and use,if you want to read,not permit;
only copy it to avoid it! This have waste my Half a day to find it!
by using :
updateStr+=" where ±àÂë='"+m_fnbm+"'";
//AfxMessageBox(updateStr);
//logHere("update:"+updateStr);
CString info;
char *ps1=updateStr.GetBuffer(updateStr.GetLength());
char *ps2=info.GetBuffer(updateStr.GetLength());
strcat(ps2,ps1);
// AfxMessageBox(info);
logHere(info);
db2.ExecuteSQL(updateStr);
is ok!
only copy it to avoid it! This have waste my Half a day to find it!
by using :
updateStr+=" where ±àÂë='"+m_fnbm+"'";
//AfxMessageBox(updateStr);
//logHere("update:"+updateStr);
CString info;
char *ps1=updateStr.GetBuffer(updateStr.GetLength());
char *ps2=info.GetBuffer(updateStr.GetLength());
strcat(ps2,ps1);
// AfxMessageBox(info);
logHere(info);
db2.ExecuteSQL(updateStr);
is ok!