Page 1 of 1

ZDbcMySQLMetadata.pas makes problems: "SHOW TABLES FROM

Posted: 01.03.2006, 18:12
by anse123
Hi again,

I have a ZConnection connected to a MySQL-Server and a ZQuery. To switch to another Database I execute a simple "use dbname". So far, so easy. When I query a table with "select * from table1 limit 0,10", the application throws an exception with "SQL Error: You have an error in your SQL syntax...(blabla)...near 'LIKE 'table1'' at line 1".

This query with the LIKE in it is done by zeos internally and located in the ZDbcMySQLMetadata.pas . The executed query is as this:

Code: Select all

SHOW TABLES FROM  LIKE 'table1'
The databasename after FROM is missing! But I HAVE specified the property ZConnection.database ....

What am I doing wrong?

Greetings,
Ansgar

Posted: 01.03.2006, 21:05
by anse123
got it! The ZConnection.Database MUST be set BEFORE .connect is called. I wonder if this is a bug in zeos?

Greetings,
Ansgar