double quotes and Invalid Table Name ''
Posted: Mon 09 Jul 2007 18:22
Hi all,
we have an application developed with Kylix 2 / midas and connected to MySQL 3.23 with Borland's drivers. Now we are upgrading our Debian systems and MySQL is at 4.1, so those drivers have stopped working. We've downloaded crlab.com drivers to test them out, and the good thing is that, after configuring dbxdrivers and dbxconnections, we can connect again to MySQL using libsqlmda.so.3.20, but the bad news is we still can not access MySQL table data - it seems the driver is adding two single quotes around table names in the queries it sends to the server.
In our application we have TDataSetProvider's linked to a TSQLClientDataSet's with CommandType = 'ctTable' and CommandText set to the table name of each table. Using DBMonitor, the query built and sent by the driver for a table 'Clients' to MySQL is 'select * from ``Clients``' (note the quotes around Clients), so MySQL reasonably returns error Invalid Table Name ''. We've used the UseQuoteChar option (set to false) as explained in the documentation, but the generated sql is the same.
What are we doing wrong in setting up the driver and the Kylix components?
TIA,
Eduardo
we have an application developed with Kylix 2 / midas and connected to MySQL 3.23 with Borland's drivers. Now we are upgrading our Debian systems and MySQL is at 4.1, so those drivers have stopped working. We've downloaded crlab.com drivers to test them out, and the good thing is that, after configuring dbxdrivers and dbxconnections, we can connect again to MySQL using libsqlmda.so.3.20, but the bad news is we still can not access MySQL table data - it seems the driver is adding two single quotes around table names in the queries it sends to the server.
In our application we have TDataSetProvider's linked to a TSQLClientDataSet's with CommandType = 'ctTable' and CommandText set to the table name of each table. Using DBMonitor, the query built and sent by the driver for a table 'Clients' to MySQL is 'select * from ``Clients``' (note the quotes around Clients), so MySQL reasonably returns error Invalid Table Name ''. We've used the UseQuoteChar option (set to false) as explained in the documentation, but the generated sql is the same.
What are we doing wrong in setting up the driver and the Kylix components?
TIA,
Eduardo