On Sat, 2008-07-26 at 23:55 +0200, Markus Hoenicka wrote:
> Balazs Scheidler writes:
>  > 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.

Thanks, this sounds great.

-- 
Bazsi


-------------------------------------------------------------------------
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