MyConnection

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
SidiGo
Posts: 2
Joined: Fri 11 Aug 2017 17:57

MyConnection

Post by SidiGo » Fri 11 Aug 2017 18:23

Dear forum members,

if I have MyConnection1 on Unit1 and MyQuery1 on Unit2 so I have to declare Unit1 in uses of Unit2 to use MyConnection1 in MyQuery1.Connection of unit2.

How can I use MyConnection1 without declaration Unit1 in Uses of Unit2 ??

kind regards
Sidi

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: MyConnection

Post by ViktorV » Mon 14 Aug 2017 09:15

You cannot use the TMyConnection component in Unit 2, which is declared in Unit1, without adding Unit1 to the USES clause of Unit2. This behavior is related to IDE architecture specificity, but not to MyDAC functionality and we cannot affect it in any way.

SidiGo
Posts: 2
Joined: Fri 11 Aug 2017 17:57

Re: MyConnection

Post by SidiGo » Mon 14 Aug 2017 20:41

ViktorV wrote:You cannot use the TMyConnection component in Unit 2, which is declared in Unit1, without adding Unit1 to the USES clause of Unit2. This behavior is related to IDE architecture specificity, but not to MyDAC functionality and we cannot affect it in any way.
I've found a solution to the problem ;-)
I set TMyConnection and TMConnectDialog to a DataForm and then I can connect all units with TMyQuery to the DataForm-TMyConnection. In the respective application I have then only to add the DataForm in the Uses declaration.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: MyConnection

Post by ViktorV » Tue 15 Aug 2017 08:18

We are glad to hear that you have found a solution to the problem.
Feel free to contact us if you have any further questions about our products.

Post Reply