For help! MFC variable how to write data in MySQL?
Time:11-08
As I defined in MFC variables: cstrings STR. int num; Double dou; MySQL built table (car) : name (varchar), number1 (int), number1 (double); When writing data, I use the statements as follows: char SQL [300]; Sprintf_s (SQL, "INSERT INTO the car (name, number1, number1) VALUES (' % s', '% d', '% f')", STR, num, dou); But insert failed,,,
CodePudding user response:
String type field to quotes' Numbers don't add quotation marks
CodePudding user response:
Not written into the Chinese string, insert, database encoding utf8, why