[fpc-devel] Some Dataset and Variants patches

petr.kristan at epos.cz petr.kristan at epos.cz
Fri Sep 16 16:10:57 CEST 2005


Index: rtl/objpas/varutils.inc
Aded forgotten initialization
===================================================================
--- rtl/objpas/varutils.inc     (revision 1083)
+++ rtl/objpas/varutils.inc     (working copy)
@@ -359,6 +359,7 @@
     if Res<>VAR_OK then
       exit;
     Result^.DimCount:=Dim;
+    Result^.LockCount:=0;
     Result^.Flags:=psaElementFlags[VarType];
     Result^.ElementSize:=psaElementSizes[VarType];
     for i:=0 to Dim-1 do
Index: rtl/objpas/sysutils/sysstr.inc
Repaired AnsiCompareStr
===================================================================
--- rtl/objpas/sysutils/sysstr.inc      (revision 1083)
+++ rtl/objpas/sysutils/sysstr.inc      (working copy)
@@ -299,7 +299,7 @@
     Inc(S1);
     Inc(S2);
   Until (Result<>0) or (S1^=#0) or (S2^=#0);
-  if Result=0 then
+  if Result<>0 then
     if s1=#0 then
       result:=1
     else
Index: fcl/db/dataset.inc
Aded FConstraints and TempBuffer only for possibility to compile my 
big project ported to fpc
===================================================================
--- fcl/db/dataset.inc  (revision 1083)
+++ fcl/db/dataset.inc  (working copy)
@@ -27,6 +27,7 @@
   FFieldDefs:=TFieldDefs.Create(Self);
   FFieldList:=TFields.Create(Self);
   FDataSources:=TList.Create;
+  FConstraints := TCheckConstraints.Create(Self);
 end;
 
 
 
 
@@ -40,6 +41,7 @@
   Active:=False;
   FFieldDefs.Free;
   FFieldList.Free;
+  FreeAndNil(FConstraints);
   With FDatasources do
     begin
     While Count>0 do
@@ -1882,3 +1884,9 @@
   FDataSources.Remove(ADataSource);
 end;
 
+Function TDataset.TempBuffer: PChar;
+
+begin
+  //!! To be implemented
+end;
+
Index: fcl/db/db.pp
===================================================================
--- fcl/db/db.pp        (revision 1083)
+++ fcl/db/db.pp        (working copy)
@@ -1044,6 +1044,7 @@
     procedure SetRecNo(Value: Longint); virtual;
     procedure SetState(Value: TDataSetState);
     function SetTempState(const Value: TDataSetState): TDataSetState;
+    function TempBuffer: PChar;
     procedure UpdateIndexDefs; virtual;
     property ActiveRecord: Longint read FActiveRecord;
     property CurrentRecord: Longint read FCurrentRecord;

-- 
Ing. Petr Kristan
.
EPOS PRO s.r.o., Bozeny Nemcove 2625, 530 02 Pardubice
tel: +420 466335223    Czech Republic (Eastern Europe) 
fax: +420 466510709



More information about the fpc-devel mailing list