Re: [sqlite] select count(*) and sqlite3_bind_int

2006-05-31 Thread Jay Sprenkle
you should change this: rc = sqlite3_exec(memdb, "insert into dummy values (\"dummy\", \"user\")", to this: rc = sqlite3_exec(memdb, "insert into dummy values ('dummy', 'user')", You need single quotes for strings On 5/31/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I am pretty sure it i

Re: [sqlite] select count(*) and sqlite3_bind_int

2006-05-31 Thread Dennis Cote
[EMAIL PROTECTED] wrote: I am pretty sure it is something trivial but it does not work for me, can someone please help me figure out what I may be missing. strcpy( query, "select count(*) from dummy"); rc = sqlite3_prepare( memdb, query, strlen(query), &pStmt, NULL); if (rc) { return;

[sqlite] select count(*) and sqlite3_bind_int

2006-05-31 Thread Mario . Hebert
I am pretty sure it is something trivial but it does not work for me, can someone please help me figure out what I may be missing. What happens is that the call to sqlite3_bind_text returns error 25 (SQLITE_RANGE). This is caused because p->nVar is set to 0 and I am passing 1. How can I know ho