Re: [sqlite] primary key autoincrement updation problem in case refereced

2012-01-11 Thread Durga D
Simon/Jr Please find the attached main.c files. Thanks, Durga On Wed, Jan 11, 2012 at 12:58 PM, Simon Slavin wrote: > > On 11 Jan 2012, at 6:05am, Durga D wrote: > > > But, sqlite3_step(stmtoft1); is failing always. What might be the wrong > > with this approach. > > What code is it reporti

Re: [sqlite] primary key autoincrement updation problem in case refereced

2012-01-10 Thread Simon Slavin
On 11 Jan 2012, at 6:05am, Durga D wrote: > But, sqlite3_step(stmtoft1); is failing always. What might be the wrong > with this approach. What code is it reporting when it fails ? Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sql

Re: [sqlite] primary key autoincrement updation problem in case refereced

2012-01-10 Thread jr
On 11/01/12 06:58, Durga D wrote: hh field updation in t1 table is the issue. If I do in sqlite shell, it's working fine. In C language only, I have this issue. > Any idea? > hmm, you'd need to provide (excerpts of) the actual code before I could say any more. if you can post (as plain tex

Re: [sqlite] primary key autoincrement updation problem in case refereced

2012-01-10 Thread Durga D
then, how to insert the record with binding and step apis in C language with second approach? hh field updation in t1 table is the issue. If I do in sqlite shell, it's working fine. In C language only, I have this issue. Any idea? On Wed, Jan 11, 2012 at 12:17 PM, jr wrote: > On 11/01/12 06:

Re: [sqlite] primary key autoincrement updation problem in case refereced

2012-01-10 Thread jr
On 11/01/12 06:29, Durga D wrote: Deleted sqlite data base before executing first approach. and again delete sqlite database before executing second approach. ok, misread this and thought 'first approach' relevant. Issue is related to database design or insertion procedure. from what I ca

Re: [sqlite] primary key autoincrement updation problem in case refereced

2012-01-10 Thread Durga D
Deleted sqlite data base before executing first approach. and again delete sqlite database before executing second approach. Issue is related to database design or insertion procedure. There is no syntax problems in queries also. On Wed, Jan 11, 2012 at 11:54 AM, jr wrote: > On 11/01/12 06:05,

Re: [sqlite] primary key autoincrement updation problem in case refereced

2012-01-10 Thread jr
On 11/01/12 06:05, Durga D wrote: if I understand correctly: first you created tables t1 and t2, then you say 'create if not exist' -- but they already do. instead of (re-)creating tables t1 and t2, ALTER TABLE statements can be used to modify the existing. jr. _

[sqlite] primary key autoincrement updation problem in case refereced

2012-01-10 Thread Durga D
First approach: I have created database with below schema: create table if not exists t1 ( i integer primary key autoincrement, t1info text); create table if not exists t2 (ii integer primary key, t2info text, foreign key (ii) references t1 (i) ); I created two prepared statement for t1 and t2.