ZDbcMySQLMetadata.pas makes problems: "SHOW TABLES FROM

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
anse123
Junior Boarder
Junior Boarder
Posts: 26
Joined: 23.02.2006, 22:28

ZDbcMySQLMetadata.pas makes problems: "SHOW TABLES FROM

Post 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
anse123
Junior Boarder
Junior Boarder
Posts: 26
Joined: 23.02.2006, 22:28

Post 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
Post Reply