Page 1 of 1

Passing a Table Name as a Parameter

Posted: Thu 28 May 2009 10:37
by ACS2000
Is it possible to pass a table name in to a TMyQuery component as a Parameter?

I have the following, but it complains that the table name is invalid.

SELECT
:Field
FROM
:Table
WHERE
:Field = :Cust_Code

I'm trying to iterate through all the tables in a Database searching for a specific Field to change its value.

Is this possible?

Posted: Thu 28 May 2009 11:24
by Dimon
MySQL doesn't allow to pass table name as a parameter. For this you can use macros.
You can find more detailed information about macros in the MyDAC help.

Posted: Thu 28 May 2009 11:25
by ACS2000
Ok, thanks.