* Added check for circular datasource reference

git-svn-id: trunk@8167 -
This commit is contained in:
michael 2007-07-27 09:02:09 +00:00
parent 9c69c9dcf8
commit 9bc1c04688
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -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