1

(1 replies, posted in Bug Solved)

function TSqlitePassAnsiStringList.Get(Index: Integer): AnsiString;
begin
  Result := FList^[Index].FString;
end;

procedure TSqlitePassAnsiStringList.Put(Index: Integer; const S: AnsiString);
begin
  FList^[Index].FString := S;
end;

function TSqlitePassWideStringList.Get(Index: Integer): UTF16WideString;
begin
  Result := FList^[Index].FWideString;
end;

procedure TSqlitePassWideStringList.Put(Index: Integer; const S: UTF16WideString);
begin
  FList^[Index].FWideString := S;
end;

---------------
I'am add this line:
  if (Index < 0) or (Index >= FCount) then Error(SListIndexError, Index);

2

(1 replies, posted in Bug Tracking)

Delphi = 7 and 2010
Component = 0.45
SqliteLibrary = 3.6.18

Access Violation in all lookup fields.

Procedure TSqlitePassRecordset.SetFieldAsAnsiString(RecordIndex, FieldIndex: Integer; Value: AnsiString);
var
StrIndex: Integer;
begin
if FieldIsNull(RecordIndex, FieldIndex)
   then AddAnsiString(RecordIndex, FieldIndex, Value)
   else begin
        StrIndex :=  PInteger((FRecords[RecordIndex] + FInternalFieldsOffset[FieldIndex]))^;
        FAnsiStrings[StrIndex] := Value; // <-!!! AV HERE!
//StrIndex=random data
//Value=correct text
        end;
end;

_______________________
Field Example:

    object SqlitePassDataset1look: TStringField
      Tag = 3
      FieldKind = fkLookup
      FieldName = 'look'
      LookupDataSet = SqlitePassDataset2
      LookupKeyFields = 'index'
      LookupResultField = 'text'
      KeyFields = 'lookup'
      LookupCache = True
      Lookup = True
    end

---------------------------
Debugger Exception Notification
---------------------------
Project Project1.exe raised exception class EAccessViolation with message 'Access violation at address 00404150 in module 'Project1.exe'. Write of address 011A82E8'. Process stopped. Use Step or Run to continue.
---------------------------