I am trying to create a simple database using sqlite and sqlite3dataset in win xp using Lazarus 0.9.30.4. The db file is created and open but when I try to Append to it I get the 'External:SIGSEGV' error.
Hear are the create and append lines
procedure TForm1.RunButtonClick(Sender: TObject);
begin
//create database file
Dataset1.FileName:=IncludeTrailingPathDelimiter(sDir)+'simple.db';
Label1.Caption:=Dataset1.FileName;
if not Dataset1.TableExists then
begin
Dataset1.Fielddefs.Clear;
Dataset1.Fielddefs.Add('id',ftAutoinc);
Dataset1.Fielddefs.Add('zip',ftString);
Dataset1.Fielddefs.Add('count', ftInteger);
Dataset1.CreateTable;
Label1.Caption:='fields created';
end;
Dataset1.Open;
end;
procedure TForm1.AppendButtonClick(Sender: TObject);
begin
Dataset1.Append;
Dataset1.FieldByName('zip').AsString:='12345';
Dataset1.FieldByName('count').AsInteger:=1;
Dataset1.Post;
Label1.Caption:='Appended data';
end;
I followed the tutorials at sqlite4fpc -which were very helpful to get things started. I can create and run these with no errors. Anyone have any ideas as to what I missed?
I have also attached the simpldb project files (sqlite3.dll is in my directory but had to leave out of upload due to size limit).