hi,

need help with very basic question.. More of C than SQLite.

have a very simple C program using sqlite DB.

..................
int i=0;

rc = sqlite3_exec(db, "create table emp (empid num);", callback, 0, &zErrMsg);
rc = sqlite3_exec(db, "insert into emp values(i);", 0, 0, &zErrMsg);

-------------------

the insert query fails with the message stating no such column i.

the aim is very simple to insert the value of i into empid column but not sure 
how to achieve it.

pls note that value of i is dynamic and wont be hardcoded.

                                          
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to