mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 07:28:26 +02:00
* Added check for circular datasource reference
git-svn-id: trunk@8167 -
This commit is contained in:
parent
9c69c9dcf8
commit
9bc1c04688
@ -95,7 +95,8 @@ Resourcestring
|
||||
SNoFieldIndexes = 'No index currently active';
|
||||
SNotIndexField = 'Field ''%s'' is not indexed and cannot be modified';
|
||||
SErrUnknownConnectorType = 'Unknown connector type';
|
||||
|
||||
SErrCircularDataSourceReferenceNotAllowed = 'Circular datasource references are not allowed.';
|
||||
|
||||
|
||||
Implementation
|
||||
|
||||
|
@ -1413,6 +1413,8 @@ begin
|
||||
DS:=DataSource;
|
||||
If (AValue<>DS) then
|
||||
begin
|
||||
If (AValue.Dataset=Self) then
|
||||
DatabaseError(SErrCircularDataSourceReferenceNotAllowed,Self);
|
||||
If Assigned(DS) then
|
||||
DS.RemoveFreeNotification(Self);
|
||||
If Assigned(AValue) then
|
||||
|
Loading…
Reference in New Issue
Block a user