I trying to write a small database management app to compare our live and dev database schemas
At the moment I can use a single TSQLconnection to get the list of Schemas on the MySQL (5.0) server, the problem comes when I try and directly access the schemas.
I want to select a schema and show all the tables from that schema in a listbox.
The procedure below compiles, but fails with a "You have an error in your syntax" message when it hits the ExecSQL.
procedure TDM.GetTables(schemaname: string);
begin
with SQLQuery1 do
begin
SQL.Clear;
SQL.Add('SHOW TABLES FROM ' + schemaname);
ExecSQL;
end;
end;
Schemaname comes from a tcombobox seeded using GET SCHEMAS
and looks to be being passed OK.
I've tried the above with Open rather than ExecSQL and get the same error. I've also tried to append a ;
to the end of the statement.
Unless I'm being blind I'm wondering if the issue is with dbExpress
Does anyone know?