Topic: some more fix...
function TSqlitePassDatabaseOptions.GetFPageSize: TSqlitePassPageSize;
begin
Result := FDatabase.GetIntPragma('page_size');
// Range Check Error
if Result>High(TSqlitePassPageSize) then
Result := High(TSqlitePassPageSize);
if Result<Low(TSqlitePassPageSize) then
Result := Low(TSqlitePassPageSize);
end;
But it still raise exception on Designtime.
How about change "TSqlitePassPageSize" to "Word"?
{ Translates a SQLite value to its internal storage value in memory
Returns the size of the value }
function TSqlitePassRecordset.SqliteValueToBuffer(Const PSqliteData: Pointer; Const ColumnIndex: Integer; Const BufferFieldPos: Integer; Const DataType: TFieldType; Buffer: PChar): Integer;
...
ftDateTime:
begin
Result := SizeOf(Double);
if SqliteDbv3_column_type(PSqliteData, ColumnIndex) = SQLITE_NULL then Exit;
Case FDatabase.DatatypeOptions.DateTimeStorage of
dtsDateTime : DoubleValue := SqliteDbv3_column_double(PSqliteData,ColumnIndex); // miss variable
...
{ Add a String and Returns the Index of the new string in Fstrings Array }
function TSqlitePassRecordset.AddString(Buffer: PChar; StrValue: String): Integer;
begin
if FRecycledStrings.Count > 0
then begin
Result := Integer(FRecycledStrings[Pred(FRecycledStrings.Count)]); // << changed PInteger()^ to Integer
FRecycledStrings.Delete(Pred(FRecycledStrings.Count));
...
Last edited by parcel (2009-03-28 10:31:44)