Home > Software engineering >  MFC MySQL data processing problems
MFC MySQL data processing problems

Time:10-19


Cstrings str1 (" 6 ");
Cstrings str2 (" bb ");
Cstrings str3 (" 66 ");
StrSQL. The Format (_T (" insert into new_table (ID, name, score) value (' % s/'/' % s/'/'/' % s) "), str1, str2, str3);
Int a=mysql_real_query (& amp; M_sqlCon, (char *) (LPCTSTR) strSQL, (UINT) strSQL. GetLength ());
If (a!=0)
{
MessageBox (_T (" delete failed!" ));
}

After this program is running, and always fails, the return value is 1 a, please process the apes are guidance,

CodePudding user response:

SQL write wrong, can try the SQL execution in the query analyzer,
  • Related