Rob Belics wrote:
> I use the C interface and have been reading data from this database just
> fine for quite a while.  Now that I'm writing data to it, it seems
> unreliable but I'm sure it's me doing something wrong.
> 
> Using sqlite's program, I can do this:
> INSERT into CUSTOMER_ORDER(customer_id,order_num,style,color)
> values('1234',3,0,0);
> 
> Writing the same thing using the C api works immediately before that for
> entering the 'customer_id' in a different table.  But I immediately prep
> the above statement and 'step' it and it does not do anything but the
> return code is SQLITE_OK for the prepare command and SQLITE_DONE for the
> step command.  (or vice-versa.  Forget now)
> 
> I do notice, on my test server, the sqlite journal.  From reading
> elsewhere on this mailing list, it's an indication I have not ended the
> transaction or committed it.  Since "insert" should do a "begin
> transaction" automatically, I "end transaction" and "step" it but there
> is no change.
> 
> Could someone please straighten me out on this.  Thanks.
> 

If you step an insert statement, and it returns SQLITE_DONE, then it 
completed and hence would have closed any transaction it opened in auto 
commit mode. If you still have a journal file then you must have a 
manual transaction open.

You will probably get better, more detailed, help if you post the code 
you are using to write to the database.

HTH
Dennis Cote



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

Reply via email to