RAKESH HEMRAJANI wrote:
> int i=0;
> rc = sqlite3_exec(db, "insert into emp values(i);", 0, 0, &zErrMsg);
Use sqlite3_prepare_v2, sqlite3_step, sqlite3_bind_* et al to run a
parameterized query. Something like this:
sqlite3_stmt* stmt;
sqlite3_prepare_v2(db, "insert into emp values(?);", -1, &s
Hi,
Very simple, What will be the output of printf("i"); it won't be 0 right?
use snprintf or sprintf and formulate the string then execute the query.
int i=0;
char * a[100];
snprintf(a,100,"insert into emp values(%d);",i); /or
/*sprintf(a,"insert into emp values(%d);",i);*/
rc = sqlite3_exec(
2 matches
Mail list logo