2 datamodules, TMyConnection connection not defined

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Guest

2 datamodules, TMyConnection connection not defined

Post by Guest » Tue 15 Aug 2006 14:23

Hello,

I have 2 data modules with a bunch of MySql components on both. There is a TMyConnection component on the 1st module. Everything works except when I close all the files in the project and then I try to reopen those files. The TMyQuery and TMyTable components on the 2nd module get a dialog box that says Connection is not defined. So basically that makes all the Active properties on those components on the 2nd module false. Its rather annoying. Is there any way to prevent this from happening every time I open the project up?

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Wed 16 Aug 2006 07:55

Unfortunately we could not reproduce the problem. Please send us (evgeniyD*crlab*com) a complete small sample to demonstrate it
Also supply us following information
- Exact version of Delphi, C++ Builder or Kylix
- Exact version of MyDAC. You can see it in About sheet of TMyConnection Editor

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 18 Aug 2006 06:43

We have reproduced the problem. This is the problem of Delphi. It concerns with component creation sequence. Opening DataModule that has Connection object before opening DataModule that refers to the first one should help to avoid this problem.

Guest

Post by Guest » Tue 22 Aug 2006 17:00

Yeah I did try to do that. But I still had the same issue. There is definitely something whacky going on with the component creation order. I basically got rid of one of my datamodules and just put all the MySQL components and datasource components all on the same datamodule.

Post Reply