LURKIN Denis wrote:
When I look at the name of the data base (struct sqlite3 - >
aDb - > zName), I receive "main" like name!
Don't do that! It will only lead to bad things.
The sqlite3 structure is an opaque object for the internal use of
sqlite3 library routines only. You should only use the API functions to
access the database.
Why the name isn't "lolo"?
Because lolo is the name of the file that holds the database, not the
database itself. You can attach other databases and give them names. You
can use the command:
pragma database_list;
to get a list of all open databases and their associated filenames.
I then created two tables: "user" and "nobody".
When I look at the number of table (struct sqlite3 - > nTable), I
receive "0"!
Don't do that! See above.
Why? Normally that must be "2".
You can use normal SQL to get the number of tables from the
sqlite_master table:
select count(*) from sqlite_master where type='table';
This table also contains other useful information about each table. In
addition there are several pragma command that can be used to get
detailed information about the tables and indexes (sp) in the database.
You should never use the sqlite3 pointer to extract info about the
database. It is internal data, and subject to change at any time.
Dennis Cote