[sqlite] sqlite error 25 during bind

2016-04-10 Thread Kumar Suraj
Any idea what could be wrong here.. On Sat, Apr 9, 2016 at 5:10 PM, Kumar Suraj wrote: > Yes i am calling sqlite3_prepare_v2 > > snprintf(command, 512, INSERT_DN); > if ( (rv = sqlite3_prepare_v2(sqlHandle->db, command, -1, > , NULL) ) !=

[sqlite] sqlite error 25 during bind

2016-04-10 Thread Olivier Mascia
Le 10 avr. 2016 ? 14:12, Kumar Suraj a ?crit : > > Any idea what could be wrong here.. Have you checked the return value of sqlite3_bind_parameter_count(newStmt) after successful call to sqlite3_prepare_v2()? I would also output the string returned by sqlite3_sql(newStmt) in your error

[sqlite] sqlite error 25 during bind

2016-04-10 Thread Simon Slavin
On 10 Apr 2016, at 1:12pm, Kumar Suraj wrote: > Any idea what could be wrong here.. The error indicates you're trying to bind to, for example, item 4 when the string only has two binding points. Use a debugger to show the string you're binding to at the last possible point. Simon.

[sqlite] sqlite error 25 during bind

2016-04-09 Thread Kumar Suraj
Yes i am calling sqlite3_prepare_v2 snprintf(command, 512, INSERT_DN); if ( (rv = sqlite3_prepare_v2(sqlHandle->db, command, -1, , NULL) ) != SQLITE_OK ) { fprintf(stderr, "Error Insert : sqlite3_prepare_v2, Error code : %d\n",

[sqlite] sqlite error 25 during bind

2016-04-06 Thread Kumar Suraj
Hi I am getting following error in this piece of code.. Any idea what could be wrong ? *(25) SQLITE_RANGE* The SQLITE_RANGE error indices that the parameter number argument to one of the sqlite3_bind routines or the column number in one of the

[sqlite] sqlite error 25 during bind

2016-04-06 Thread Simon Davies
On 6 April 2016 at 12:16, Kumar Suraj wrote: > Hi . . . > Here is table definition and insert statement which is causing this > > #define CREATE_TABLE_DNINDEX "CREATE TABLE IF NOT EXISTS TBL (dn BLOB, > pclassid INTEGER, pkey INTEGER, kindex INTEGER PRIMARY KEY ASC)" > > #define INSERT_DN