[Lazarus] TSQLQuery Error Database not assigned.

Giuliano Colla giuliano.colla at fastwebnet.it
Wed Dec 26 16:30:50 CET 2012


Il 26/12/2012 15:53, William Oliveira Ferreira ha scritto:
>
> Another point is add a transaction on your project and assign it to 
> sqlconnection...
>
> At least, i never connected without a transaction ....
>
> >
> > Did you set
> >  SQLQuery1.Database:=MySQLConnection1;
> >
> > ?
> >
> > Also 'Show databases' will - to my knowlegde - not work. It is not 
> valid SQL.
> > as far as I know, it's a metadata statement that is handled by the 
> mysql client which translates it to an API call.
> >
>
Thanks to both of you. Filling up SQLQuery and SQLTansaction properties 
(which most likely had been cleared from the example when changing 
TConnection from 5.0 to 5.1) now it works.

BTW "show databases" appears to work, because databases are shown.

Giuliano.




More information about the Lazarus mailing list