mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-28 20:39:27 +02:00
* Fixed accessing TCustomBufDataset.IndexName and CompareBookmarks from a new instance (bug 16695+adapted test)
git-svn-id: trunk@15412 -
This commit is contained in:
parent
39adedb12a
commit
fb3ede2ef7
@ -2206,7 +2206,10 @@ end;
|
|||||||
|
|
||||||
function TCustomBufDataset.GetIndexName: String;
|
function TCustomBufDataset.GetIndexName: String;
|
||||||
begin
|
begin
|
||||||
result := FCurrentIndex.Name;
|
if FIndexesCount>0 then
|
||||||
|
result := FCurrentIndex.Name
|
||||||
|
else
|
||||||
|
result := '';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCustomBufDataset.GetBufUniDirectional: boolean;
|
function TCustomBufDataset.GetBufUniDirectional: boolean;
|
||||||
@ -2633,7 +2636,7 @@ end;
|
|||||||
function TCustomBufDataset.CompareBookmarks(Bookmark1, Bookmark2: TBookmark
|
function TCustomBufDataset.CompareBookmarks(Bookmark1, Bookmark2: TBookmark
|
||||||
): Longint;
|
): Longint;
|
||||||
begin
|
begin
|
||||||
if FCurrentIndex.CompareBookmarks(Bookmark1,Bookmark2) then
|
if Assigned(FCurrentIndex) and FCurrentIndex.CompareBookmarks(Bookmark1,Bookmark2) then
|
||||||
Result := 0
|
Result := 0
|
||||||
else
|
else
|
||||||
Result := -1;
|
Result := -1;
|
||||||
|
@ -543,6 +543,8 @@ var s : string;
|
|||||||
begin
|
begin
|
||||||
bufds := DBConnector.GetNDataset(5) as TCustomBufDataset;
|
bufds := DBConnector.GetNDataset(5) as TCustomBufDataset;
|
||||||
s := bufds.IndexFieldNames;
|
s := bufds.IndexFieldNames;
|
||||||
|
s := bufds.IndexName;
|
||||||
|
bufds.CompareBookmarks(nil,nil);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TTestDBBasics.TestCanModifySpecialFields;
|
procedure TTestDBBasics.TestCanModifySpecialFields;
|
||||||
|
Loading…
Reference in New Issue
Block a user