Hi,
Error (Access violation at address) to change the Connection of a ZQuery - MySQL.
Example:
with Query
begin
Close;
Connection: = Database1;
Open;
end;
Open properly.
But in the sequel, if I change the Connection error occurs:
with Query
begin
Close;
Connection: = Database2;
Open;
end;
Tested with ZEOSDBO-7.1.4-stable and ZEOSDBO-7.2.0-beta in RAD Studio XE7 with Windows 7.
In Delphi 7 with ZEOSDBO-6.6.6-stable does not occur this error.
Note: I am converting an application from Delphi 7 to XE7.
Please can someone help me?
Thank you.
Error change the Connection of a ZQuery - MySQL
-
- Fresh Boarder
- Posts: 5
- Joined: 02.12.2013, 18:26
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
Re: Error change the Connection of a ZQuery - MySQL
Patch done: R3542 \testing-7.2 (SVN)
You need to replace this function with new code in ZAbstractRODataSet.pas:
You need to replace this function with new code in ZAbstractRODataSet.pas:
Code: Select all
procedure TZAbstractRODataset.SetConnection(Value: TZAbstractConnection);
begin
if FConnection <> Value then
begin
if Active then
Close;
Unprepare; <<<<----- was missing
if FConnection <> nil then
FConnection.UnregisterDataSet(Self);
FConnection := Value;
if FConnection <> nil then
FConnection.RegisterDataSet(Self);
end;
end;
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/