Dear. everybody.
when i progress the developing some functions using mysql db with vc++2005, i have the following problems
i connected mysqldb and i runned the query to insert some records to my table in the DB, but i cant success in inserting.
my sample code is followed as :
char sqlString[1024];
sprintf(sqlString,"INSERT INTO myTable('StaffID','Name','Birthday','PhotoURL') VALUES('%d','%s','%s','%s')",'3','playboy','10-19-2009','c:\myphoto.jpg');
int m_Query_State = mysql_query(m_pConnection, sqlString);
if (m_Query_State != 0)
{
fprintf(stderr, "Mysql query error : %s", mysql_error(&m_Conn));
return ;
}
when i run this statement , m_Query_State Value =1. so the run of the code was faild.
how can i solve this problem?
if someone experienced the connectivity mysqldb with vc++2005, please kindly teach me.
i'll really appreciate if you help me.