"Datasource makes a circular link" exception when assign datasource to nil

The forum for ZeosLib 7.2 Report problems. Ask for help, post proposals for the new version and Zeoslib 7.2 features here. This is a forum that will be edited once the 7.2.x version goes into RC/stable!!

My personal intention for 7.2 is to speed up the internals as optimal a possible for all IDE's. Hope you can help?! Have fun with testing 7.2
Post Reply
omurolmez
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 04.06.2022, 21:55

"Datasource makes a circular link" exception when assign datasource to nil

Post by omurolmez »

Hello,

(this is my second post with same subject and topic. First one is not accepted I guess)

When assign {TZQuery}ZQuery2.DataSource :=nil or pick (none) from IDE, I get "Datasource makes a circular link" exception.

On a datamodule :
Put two TZQuery as ZQuery1 and ZQuery2
Put two TDataSource as DataSource1 and DataSource2
Keep the queries' SQLs empty.

with IDE make these connections :
DataSource1.DataSet :=ZQuery1;
DataSource2.DataSet :=ZQuery2;

with IDE make this connection :
ZQuery2.DataSource :=DataSource1;
then with IDE or programmatically, try to remove connection :
get the exception
{ZAbstractRODataSet.pas}procedure TZAbstractRODataset.SetDataSource(Value: TDataSource);
begin
  {$IFNDEF FPC}
  if IsLinkedTo(Value) then
  {$ELSE}
  if Value.IsLinkedTo(Self) then
  {$ENDIF}
    raise EZDatabaseError.Create(SCircularLink);
  DataLink.DataSource := Value;
end;
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1939
Joined: 17.01.2011, 14:17

Re: "Datasource makes a circular link" exception when assign datasource to nil

Post by marsupilami »

Hello :)
omurolmez wrote: 01.08.2022, 09:04 (this is my second post with same subject and topic. First one is not accepted I guess)
I am sorry - I didn't get to approving new posts for some days. Your other post (viewtopic.php?f=50&t=165631) has been approved. I am locking this thread in favor of the other thread.

Best regards,

Jan
Post Reply