[odb-users] Open the generated databse from another application
Boris Kolpackov
boris at codesynthesis.com
Mon May 21 05:01:57 EDT 2012
Hi Khaldon,
khaldon hmesheh <khaldon_hmesheh at yahoo.com> writes:
> If I created two projects (I use sqlite and MVS2008 on windows XP.) to
> store some persons with different names and ages by one application and
> I store some another persons to the same database from within the second
> application. If I try to query for all objects from one application I
> couldn't get the objects created by the second one. This happened although I
> have only one database file.
I suggest that you examine the database with the sqlite shell[1]. You
can download a precompiled binary for Windows from the SQLite download
page[2].
First examine it after the first application has run. You can check
which tables are present in the database using this query:
SELECT * FROM sqlite_master WHERE type='table';
You can then see which rows are present in each table of interest
using this query:
SELECT * FROM <table>;
Then you can examine the same database after the second application
has run. This time you can confirm that the new rows have been added
to this database and to the correct tables. If the new rows are not
present, then you second application must be using another database
file. If the new rows are present but the old ones are gone, then
your second application most likely re-creates the schema in the
database (which also deletes all the data).
If none of this provides any clues, then you can turn on the SQL
statement tracing in your applications (see Section 3.12, "Tracing
SQL Statement Execution" in the ODB manual) and make sure that the
statements use the correct table names, etc.
[1] http://www.sqlite.org/sqlite.html
[2] http://www.sqlite.org/download.html
Boris
More information about the odb-users
mailing list