Hi Pavel,

Thanks a lot. You are right. I missed out a sqlite3_finalize() and that 
prevented the commit.

Regards,
Souvik

-----Original Message-----
From: sqlite-users-boun...@sqlite.org on behalf of Pavel Ivanov
Sent: Mon 12/7/2009 6:15 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] sqlite3_exec() returns SQLITE_OK but 
Databaseshowsdifferent result
 
> 1) You are opening a different file than the one you think you are opening. 
> E.g. you are using a relative path to the file, and the workding directory is 
> not what you expect it to be.
>
> 2) You are starting an explicit transaction (see BEGIN) and forgetting to 
> commit it.

3) You are starting to execute some SELECT statement and don't finish
it (do not execute sqlite3_reset or sqlite3_finalize). It prevents
SQLite from committing anything no matter if you issue COMMIT
explicitly or rely on auto-committing.


Pavel

On Mon, Dec 7, 2009 at 7:33 AM, Igor Tandetnik <itandet...@mvps.org> wrote:
> souvik.da...@wipro.com wrote:
>> I am accessing the same database from two different processes. From one of 
>> the process , I am able
>> to create tables in runtime but when I am trying to create a table from 
>> another process in runtime on the same DB
>> I am not able to create so. The strange part is that I find
>> sqlite3_exec() is returning retCode as SQLITE_OK. But then , when
>> I am going and checking the DB, I am not able to see the table.
>
> There are two common causes for this.
>
> 1) You are opening a different file than the one you think you are opening. 
> E.g. you are using a relative path to the file, and the workding directory is 
> not what you expect it to be.
>
> 2) You are starting an explicit transaction (see BEGIN) and forgetting to 
> commit it.
>
> Igor Tandetnik
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email. 

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

Reply via email to