소스 검색

fcl-db: sdf: fix for TTestCursorDBBasics.TestUpdateCursorPos

git-svn-id: trunk@39023 -
lacak 7 년 전
부모
커밋
fc390136cb
1개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 4 3
      packages/fcl-db/src/sdf/sdfdata.pp

+ 4 - 3
packages/fcl-db/src/sdf/sdfdata.pp

@@ -562,12 +562,13 @@ function TFixedFormatDataSet.GetRecNo: Longint;
 var
   RecBuf: TRecordBuffer;
 begin
-  Result := 0;
   if GetActiveRecBuf(RecBuf) and (State <> dsInsert) then
   begin
-    InternalSetToRecord(RecBuf);
+    UpdateCursorPos;
     Result := FCurRec + 1 - FDataOffset;
-  end;
+  end
+  else
+    Result := 0;
 end;
 
 procedure TFixedFormatDataSet.SetRecNo(Value: Integer);