[SOLVED]sqlite3dataset append causes external:sigsegv error lazarus / 16-Databases ---------------------------------------------------------------------- rgtech · 2012-09-21 19:49 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 Code: [Select]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). ---------------------------------------------------------------------- ludob · 2012-09-23 17:08 You have a stack overflow because of Dataset1.Mastersource being set to datasource1. Basically you are making a circular reference and Datalink events are looping forever causing a stack overflow. Remove the Dataset1.Mastersource. It is only used for master detail relationships where you point to the master query. ---------------------------------------------------------------------- rgtech · 2012-09-24 18:50 Thank you very much ludub. I new it was something small that I was missing. Just learning how to program database and still figuring out how all the 'parts' connect to each other. I added [SOLVED] to subject. If there is something else I am supposed to do to mark as solved please let me know. This was my first post here. Thanks again - Ron