Wallace Guest
|
Posted: Sat Jun 17, 2006 9:10 am Post subject: Problem in formatting query!!!! Help needed... |
|
|
Hai All,
I have a problem in formatting a query...
sprintf((char*)szSqlStr,"INSERT INTO
ins(version,art,lobenr,rondetyper,tekst,font) VALUES
('%s',%d,%d,%ld,'%s','%s')",buff, art, lobenr, rondetyper, tekst,
font);
buff is char array
art is int
lobenr is short
rondetyper unsigned long
tekst char array
font char array
When I run this query( retcode = SQLExecute(hStmt) ), it is returning
-1.
But when I run the same query but giving hard coded values to these
variables, it is getting inserted into DB.
Dont know whether the problem is in formatting or some other..
Help needed!!!
Looking forward for the response.. |
|