Newbye problem with a datamodule

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Chris CII
Posts: 2
Joined: Tue 24 Apr 2007 15:15

Newbye problem with a datamodule

Post by Chris CII » Tue 24 Apr 2007 16:35

I have an old application that used BDE, and I'm upgrading it to MySQL.
I have added a TMyConnection and a TMyQuery on the Datamodule.

Now when I try to access the MyQuery's SQL property from a form that references the Datamodule I get an access violation and on debuggging I get that the property is not accessible.

And when I try to put the Query on the form and access the Connection on the DataModule, I can get the connection property set in the property browser, but when I run I get an error 'connection is not defined'.

Where is my problem and what can I do to get the datamodule to be useful ?

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

Post by Antaeus » Wed 25 Apr 2007 11:27

I tried to reproduce these problems, but with no success. Probably you do not use the actual MyDAC version (MyDAC 5.00.1.6). Try to download it and test again.
If these problems can be reproduced with MyDAC 5.00.1.6 as well, provide exact steps to reproduce them. Also give some additional information:
- exact version of Delphi, C++Builder or Kylix you are using;
- do you have DataSet Manager (it is a part of MyDAC installation) or MySQL Developer Tools installed on your IDE?

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

Post by Antaeus » Wed 25 Apr 2007 11:41

Chris CII wrote:... on debuggging I get that the property is not accessible.
Probably you run your application with the Optimization option (see the Compiler tab in the Project | Options dialog). Try to uncheck this option.

Chris CII
Posts: 2
Joined: Tue 24 Apr 2007 15:15

Post by Chris CII » Thu 03 May 2007 13:21

Ok, I tried everything I could think of, and ended buying the latest version of MyDAC components. Now, each time I load Delphi I get following message (translated from french):
"Unable to load package C:\Program Files\Borland\BDS\4.0\Bin\DataSetManager100.BPL.
Access violation in adress 5204CB30 in module 'vcl100.bpl'. Read adress 0000005C. Do you want to try loading this package on next load of project? "

And I can't find how to get that module to load.
Can someone help me.

I've already uninstalled and reinstalled the components and nothing helps.

Graf
Posts: 10
Joined: Wed 04 Apr 2007 12:48

Post by Graf » Fri 04 May 2007 06:52

Do you use original (English) Delphi or a localized one?

kaffeburk
Posts: 214
Joined: Mon 29 Jan 2007 08:03

Post by kaffeburk » Thu 17 May 2007 17:01

Maybe im wrong, but i remember a similar problem. Perhaps u put the code in an "on create" event, and or are trying to acess the datamodule before it is created?

Check in what order the forms are created, and make sure the datamodule is created before the form who calls it.

/Pär

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

Post by Antaeus » Fri 18 May 2007 08:18

The reason of this problem is DataSet Manager that had problems loading on localized IDEs. We have already fixed this problem and included the fix in the last MyDAC build (MyDAC 5.0.1.7). This build of MyDAC is already available for download.

Post Reply