Page 1 of 1
Newbye problem with a datamodule
Posted: Tue 24 Apr 2007 16:35
by Chris CII
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 ?
Posted: Wed 25 Apr 2007 11:27
by Antaeus
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?
Posted: Wed 25 Apr 2007 11:41
by Antaeus
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.
Posted: Thu 03 May 2007 13:21
by Chris CII
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.
Posted: Fri 04 May 2007 06:52
by Graf
Do you use original (English) Delphi or a localized one?
Posted: Thu 17 May 2007 17:01
by kaffeburk
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
Posted: Fri 18 May 2007 08:18
by Antaeus
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.