|
@@ -4,9 +4,6 @@ program fillds;
|
|
{$H+}
|
|
{$H+}
|
|
{$define DEBUGHEAP}
|
|
{$define DEBUGHEAP}
|
|
|
|
|
|
-//To test the sqlite3 version replace sqliteds by sqlite3ds
|
|
|
|
-// and TSqliteDataset by TSqlite3Dataset
|
|
|
|
-
|
|
|
|
uses
|
|
uses
|
|
{$ifdef DEBUGHEAP}
|
|
{$ifdef DEBUGHEAP}
|
|
Heaptrc,
|
|
Heaptrc,
|
|
@@ -14,7 +11,7 @@ uses
|
|
{$ifdef Linux}
|
|
{$ifdef Linux}
|
|
cmem,
|
|
cmem,
|
|
{$endif}
|
|
{$endif}
|
|
- sqliteds,
|
|
|
|
|
|
+ sqlite3ds,
|
|
sysutils,db,IniFiles;
|
|
sysutils,db,IniFiles;
|
|
|
|
|
|
const
|
|
const
|
|
@@ -24,14 +21,14 @@ const
|
|
MEMOTEST_FILENAME = 'createds.pas';
|
|
MEMOTEST_FILENAME = 'createds.pas';
|
|
|
|
|
|
var
|
|
var
|
|
- dsTest:TSqliteDataset;
|
|
|
|
|
|
+ dsTest: TSqlite3Dataset;
|
|
ini: TIniFile;
|
|
ini: TIniFile;
|
|
|
|
|
|
begin
|
|
begin
|
|
{$ifdef DEBUGHEAP}
|
|
{$ifdef DEBUGHEAP}
|
|
SetHeapTraceOutput(ExtractFileName(ParamStr(0))+'.heap.log');
|
|
SetHeapTraceOutput(ExtractFileName(ParamStr(0))+'.heap.log');
|
|
{$endif}
|
|
{$endif}
|
|
- dsTest:=TSqliteDataset.Create(nil);
|
|
|
|
|
|
+ dsTest:=TSqlite3Dataset.Create(nil);
|
|
with dsTest do
|
|
with dsTest do
|
|
begin
|
|
begin
|
|
//Load Database properties from a inifile
|
|
//Load Database properties from a inifile
|
|
@@ -55,6 +52,7 @@ begin
|
|
FieldByName('Currency').AsFloat:=1.23;
|
|
FieldByName('Currency').AsFloat:=1.23;
|
|
FieldByName('LargeInt').AsLargeInt:=2163871263187263;
|
|
FieldByName('LargeInt').AsLargeInt:=2163871263187263;
|
|
Post;
|
|
Post;
|
|
|
|
+ {
|
|
Append;
|
|
Append;
|
|
FieldByName('Integer').AsInteger:=101;
|
|
FieldByName('Integer').AsInteger:=101;
|
|
FieldByName('String').AsString:='Américo';
|
|
FieldByName('String').AsString:='Américo';
|
|
@@ -93,6 +91,7 @@ begin
|
|
writeln('ReturnString after ApplyUpdates: ',ReturnString);
|
|
writeln('ReturnString after ApplyUpdates: ',ReturnString);
|
|
//Is not necessary to call Close. Destroy will call it.
|
|
//Is not necessary to call Close. Destroy will call it.
|
|
//Close;
|
|
//Close;
|
|
|
|
+ }
|
|
Destroy;
|
|
Destroy;
|
|
end;
|
|
end;
|
|
end.
|
|
end.
|