[Gambas-user] Sqlite3 Driver changed?
Tobias Boege
taboege at ...626...
Fri Aug 15 20:11:08 CEST 2014
On Fri, 15 Aug 2014, Jorge Carri??n wrote:
> Tobi:
> You're right. Excuse me.
> I'm using the 3.5.4 version of the stable repository of nemh (now
> deprecated, I think...).
> Attached a little proyect showing what I mean.
> I've testing the database with SqliteMan application and respond ok to the
> copy-paste pragma instruction.
>
Well, a quick and reliable fix may be for you to not use the PRAGMA :-)
Turns out that Gambas can execute just this PRAGMA table_info correctly for
you from the Table.Fields interface, as shown below. However, gb.db.sqlite3
doesn't seem to get any PRAGMA query right... I'll just continue staring at
the sources for a while, maybe I find the cause.
So, to access table metadata, namely a good subset of what PRAGMA table_info
tells you, you have to do:
Dim hTable As Table = hConnection.Tables["test"]
Dim hField As Field
For Each hField In hTable.Fields
Print hField.Name, hField.Type ' etc.
Next
It does not provide all of the sqlite3-specific information, though...
Look at the docs: Table.Fields [0], Field [1].
Regards,
Tobi
[0] http://gambaswiki.org/wiki/comp/gb.db/table/fields
[1] http://gambaswiki.org/wiki/comp/gb.db/field
--
"There's an old saying: Don't change anything... ever!" -- Mr. Monk
More information about the User
mailing list