Change Connection option in TMYQuery - How?

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
EPMS
Posts: 15
Joined: Fri 10 Dec 2004 07:05

Change Connection option in TMYQuery - How?

Post by EPMS » Wed 25 Aug 2010 09:29

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

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Wed 25 Aug 2010 11:07

Use the following code:

Code: Select all

DataModule1->sql_select->Connection = TMYConnection2;

EPMS
Posts: 15
Joined: Fri 10 Dec 2004 07:05

Post by EPMS » Wed 25 Aug 2010 13:09

Thanks. :-)

Post Reply