Page 1 of 1

Change Connection option in TMYQuery - How?

Posted: Wed 25 Aug 2010 09:29
by EPMS
Hello,
i have a little Problem. I have a TMYQuery and two TMYConnections in my project. Know i want to change the Connection option from TMYConnection1 into TMYConnection 2.

With

Code: Select all

DataModule1->sql_select->Connection = "TMYConnection2";
i get an error.

What must i do to change the option?

Thanks

Posted: Wed 25 Aug 2010 11:07
by Dimon
Use the following code:

Code: Select all

DataModule1->sql_select->Connection = TMYConnection2;

Posted: Wed 25 Aug 2010 13:09
by EPMS
Thanks. :-)