Balazs Scheidler writes:
 > This sounds doable, however I potentially have hundreds of tables in the
 > database, I'd prefer avoiding having to list all tables when I need to
 > open a new one.
 > 

This is, admittedly, inconvenient.

 > Hmm, I tried but sqlite reports an error:
 > sqlite> create table aaa (a,b,c);
 > sqlite> alter table aaa add d;
 > SQL error: duplicate column name: d

This looks really screwed. I looked into the SQLite3 interface again
to see whether we'd get at more information if we stop using the
sqlite3_get_table() function which is just a wrapper around some
low-level interface. However, that interface is implemented using
callbacks which receive the row data and the row metadata (column
names and such). That is, no rows, no metadata.

However, there is a PRAGMA table_info(table_name) which may come in
handy at this point. We'd have to run a query using this PRAGMA
whenever a query returns 0 rows to manually fix the column number in
the (empty) libdbi result set. I'll check whether this is doable.

regards,
Markus

-- 
Markus Hoenicka
[EMAIL PROTECTED]
(Spam-protected email: replace the quadrupeds with "mhoenicka")
http://www.mhoenicka.de

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Libdbi-drivers-devel mailing list
Libdbi-drivers-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel

Reply via email to