[sqlite] sqldiff -- interpreting the data

2016-09-17 Thread Kumar Suraj
Can anyone please tell me when i use SQLdiff --summary option what does the following row means tablename:0 changes,0 inserts , 288 deletes, 0 unchanged.. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/c

[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, >

[sqlite] sqlite error 25 during bind

2016-04-09 Thread Kumar Suraj
sqlite3_finalize(newStmt); return rv; } On Wed, Apr 6, 2016 at 4:55 PM, Simon Davies wrote: > On 6 April 2016 at 12:16, Kumar Suraj wrote: > > Hi > . > . > . > > Here is table definition and insert statement which is causing this > > > &

[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 during bind

2015-07-05 Thread Kumar Suraj
Thanks a lot .. this helped.. On Fri, Jul 3, 2015 at 10:16 PM, Simon Slavin wrote: > > On 3 Jul 2015, at 5:16pm, Kumar Suraj wrote: > > > So whats the solution here. I am giving 4 statements because i need > insert > > to be transactional. Some other process could be

[sqlite] error during bind

2015-07-03 Thread Kumar Suraj
PM, Stephan Beal wrote: > On Fri, Jul 3, 2015 at 1:39 PM, Kumar Suraj wrote: > > > #define INSERT_DN "BEGIN TRANSACTION; INSERT INTO TBL (dn) VALUES (?); > > SELECT last_insert_rowid(); COMMIT;" > > > > > prepare() expects a _single_ statement. You

[sqlite] error during bind

2015-07-03 Thread Kumar Suraj
Hi I have trying to insert in a sqlite db.. here is the code but i am getting following error.. what could be the issue. *Error Insert : sqlite3_bind_blob, Error code : 25* #define INSERT_DN "BEGIN TRANSACTION; INSERT INTO TBL (dn) VALUES (?); SELECT last_insert_rowid(); COMMIT;" BinBuffer aInB

[sqlite] error during sqlite_bind

2015-04-09 Thread Kumar Suraj
ring %s size %lu\n", aInBuffer.ptr, sizeof(aInBuffer.ptr)); rv = sqlite3_bind_blob(newStmt, 1, aInBuffer.ptr, sizeof(aInBuffer.ptr), SQLITE_STATIC); On Tue, Apr 7, 2015 at 6:40 PM, Richard Hipp wrote: > On 4/7/15, Igor Tandetnik wrote: > > On 4/7/2015 9:11 PM, Kumar Suraj wrote: &

[sqlite] error during sqlite_bind

2015-04-07 Thread Kumar Suraj
You can add this to top of the code.. char command[512]; snprintf(command, 512, SELECT_DN); On Tue, Apr 7, 2015 at 6:11 PM, Kumar Suraj wrote: > I have not added the whole code.. command is defined.. in my code.. > > On Tue, Apr 7, 2015 at 5:42 PM, Igor Tandetnik wrote: &g

[sqlite] error during sqlite_bind

2015-04-07 Thread Kumar Suraj
I have not added the whole code.. command is defined.. in my code.. On Tue, Apr 7, 2015 at 5:42 PM, Igor Tandetnik wrote: > On 4/7/2015 8:04 PM, Kumar Suraj wrote: > >> if ( (rv = sqlite3_prepare_v2(sqlHandle->db, command, strlen(command), >>

[sqlite] error during sqlite_bind

2015-04-07 Thread Kumar Suraj
Hi I am trying to use SQLite c api to create a db, table and then do a select query but i am getting following error #define SQLITE_RANGE 25 /* 2nd parameter to sqlite3_bind out of range */ Here is the code call #define SELECT_DN "select kindex from TBL where dn=?" char buffer[100] = "a/b/c/d

[sqlite] insert in sqlite (returning value for inserted row)

2015-04-01 Thread Kumar Suraj
<https://www.sqlite.org/lang_createtable.html#rowid>. On Tue, Mar 31, 2015 at 6:23 PM, Richard Hipp wrote: > https://www.sqlite.org/c3ref/last_insert_rowid.html > > On Tue, Mar 31, 2015 at 9:19 PM, Kumar Suraj wrote: > > > Hi > > > > I am using sqlite C interfa

[sqlite] insert in sqlite (returning value for inserted row)

2015-03-31 Thread Kumar Suraj
Hi I am using sqlite C interface for inserting data in the table. The primary key is a 64 bit integer which i need to auto-increment and get populated automatically as we do not provide that value in insert statement. Is there a way i can get the autoincremented value for each row inserted when ev

[sqlite] SQLITE_IOERR_SHORT_READ error

2015-03-20 Thread Kumar Suraj
Hi We are using SQLite in our infrastructure and calling following API sqlite3_step ( but we get error SQLITE_IOERR_SHORT_READ once in a while. While error is Ok for us we were interested to know whether there are retries made inter