List:MySQL ODBC« Previous MessageNext Message »
From:Federico Balbi Date:September 22 1999 4:15pm
Subject:Re: Question on iodbc/myodbc
View as plain text  
> /* the insert statement */
>     sprintf(query,"INSERT INTO prob_entry VALUES
> (%d,'%s','%s','%s','%s','%s','%s','%s','%s','%s')",
>                   problem.prob_num,
>                   problem.prob_desc,
>                   problem.prob_type,
>                   problem.username,
>                   problem.useremail,
>                   problem.telephone,
>                   problem.timeentered,
>                   problem.closed,
>                   problem.prob_user,
>                   problem.prob_short_desc);
> 
>   rc = SQLExecDirect(hstmt, query , SQL_NTS);
>   check_return (rc, henv, hdbc, hstmt);
> <end snip>

Hi, I use VisualC++ and MySQL and upto now did not have problems.
did you try to make a query manually and see what happens?
try build the final string without sprint and see what happens...
sometimes (",',%) act weird in MySQL.

Federico
Thread
Question on iodbc/myodbcmoorleghen22 Sep
  • Question on iodbc/myodbcMichael Widenius22 Sep
  • Re: Question on iodbc/myodbcFederico Balbi22 Sep
    • Re: Question on iodbc/myodbcSteven Schoch22 Sep