Tobi, Thanks for the interest you show. I used the gambas database objects long time ago for that things... but -I don't know why- they are slowest than hell. Most of all in Mysql but in sqlite too... The pragma solution works well (like the Show columns from Table in MySql), very well until... I don't know when. Yesterday I found the error... but it can be happening since long time, I don't know.
I'm afraid that I've to return to slow solutions... Regards 2014-08-15 20:11 GMT+02:00 Tobias Boege <[email protected]>: > 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 > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/gambas-user > ------------------------------------------------------------------------------ _______________________________________________ Gambas-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gambas-user
