mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-26 03:49:45 +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;
|
||||
begin
|
||||
result := FCurrentIndex.Name;
|
||||
if FIndexesCount>0 then
|
||||
result := FCurrentIndex.Name
|
||||
else
|
||||
result := '';
|
||||
end;
|
||||
|
||||
function TCustomBufDataset.GetBufUniDirectional: boolean;
|
||||
@ -2633,7 +2636,7 @@ end;
|
||||
function TCustomBufDataset.CompareBookmarks(Bookmark1, Bookmark2: TBookmark
|
||||
): Longint;
|
||||
begin
|
||||
if FCurrentIndex.CompareBookmarks(Bookmark1,Bookmark2) then
|
||||
if Assigned(FCurrentIndex) and FCurrentIndex.CompareBookmarks(Bookmark1,Bookmark2) then
|
||||
Result := 0
|
||||
else
|
||||
Result := -1;
|
||||
|
@ -543,6 +543,8 @@ var s : string;
|
||||
begin
|
||||
bufds := DBConnector.GetNDataset(5) as TCustomBufDataset;
|
||||
s := bufds.IndexFieldNames;
|
||||
s := bufds.IndexName;
|
||||
bufds.CompareBookmarks(nil,nil);
|
||||
end;
|
||||
|
||||
procedure TTestDBBasics.TestCanModifySpecialFields;
|
||||
|
Loading…
Reference in New Issue
Block a user