mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 10:06:23 +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';
|
SNoFieldIndexes = 'No index currently active';
|
||||||
SNotIndexField = 'Field ''%s'' is not indexed and cannot be modified';
|
SNotIndexField = 'Field ''%s'' is not indexed and cannot be modified';
|
||||||
SErrUnknownConnectorType = 'Unknown connector type';
|
SErrUnknownConnectorType = 'Unknown connector type';
|
||||||
|
SErrCircularDataSourceReferenceNotAllowed = 'Circular datasource references are not allowed.';
|
||||||
|
|
||||||
|
|
||||||
Implementation
|
Implementation
|
||||||
|
|
||||||
|
@ -1413,6 +1413,8 @@ begin
|
|||||||
DS:=DataSource;
|
DS:=DataSource;
|
||||||
If (AValue<>DS) then
|
If (AValue<>DS) then
|
||||||
begin
|
begin
|
||||||
|
If (AValue.Dataset=Self) then
|
||||||
|
DatabaseError(SErrCircularDataSourceReferenceNotAllowed,Self);
|
||||||
If Assigned(DS) then
|
If Assigned(DS) then
|
||||||
DS.RemoveFreeNotification(Self);
|
DS.RemoveFreeNotification(Self);
|
||||||
If Assigned(AValue) then
|
If Assigned(AValue) then
|
||||||
|
Loading…
Reference in New Issue
Block a user