[Gambas-user] SQLite PRAGMA don't seem works any more
Jorge Carrión
shordi at ...626...
Tue Jan 6 19:16:37 CET 2015
>As for the use of PRAGMA, it never worked before.
But it did! I had a application that uses to PRAGMA sentences: the PRAGMA
table_info and the PRAGMA Foreign_keys = ON. I tested it time ago, don't
know how much time or wich version of gambas or SQLite, sorry, but it
worked... (perhaps Gambas2...)
>It's a more global change that you will get in the next revision.
Fine! Thanks Benoit.
Regards
2015-01-06 17:43 GMT+01:00 Benoît Minisini <gambas at ...1...>:
> Le 06/01/2015 17:29, Jorge Carrión a écrit :
> > I find the old code that shows the slowly of database objects in loops.
> > Just trying to get de length of all fields of all tables in a database:
> >
> > For Each tbl In hc.Tables
> > Print tbl.Name
> > For Each fld In tbl.fields
> > awidths.Add(fld.Length)
> > Next
> > Next
> >
> > I try it with two databases:
> >
> > A SQLite database with 16 tables and 127 fields.
> > A MySQL database with 6 tabñes amd 82 fields.
> >
> > The result is attahed in two images.
> >
> > With SQLite is not a bad result, but in MySQL is a disaster...
> > It seems like gambas has to "travel thru the web" in order to get the
> > information of each field of each table...
> > I use, then, the "show columns for tablename" instruction in MySQL... and
> > the PRAGMA fields_info in SQLite that does the work at once... but PRAGMA
> > doesn't work any more.
> > Looking this test is not a big issue: I can use different way to each
> > database type, but PRAGMA is a must-work on SQLite, I think.
> >
> > Regards
> >
>
> Metadata information is not part of the SQL "standard", so each database
> behaves differently.
>
> As for the use of PRAGMA, it never worked before. It's a more global
> change that you will get in the next revision.
>
> Regards,
>
> --
> Benoît Minisini
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming! The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is
> your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
More information about the User
mailing list