How to use database lazarus / 16-Databases ---------------------------------------------------------------------- Lohot · 2007-01-16 11:36 Hi, I used Delphi and I try Lazarus to create a program with database. I create DBASE VII with this code : Code: [Select]begin   Source := ExtractFilePath(Application.Name);   MyDbf := TDbf.Create(nil);   if not DirectoryExists(Source + 'data') then      if not CreateDir(Source + 'data') then         raise Exception.Create('Impossible de créer le répertoire');   try     { use relative path to "data" directory }     MyDbf.FilePath := 'data';     { we want to use Visual dBase VII compatible tables }     MyDbf.TableLevel := 7;     MyDbf.Exclusive := True;     MyDbf.TableName := 'customers.dbf';     With MyDbf.FieldDefs do begin       Add('Id', ftAutoInc, 0, True);       Add('Name', ftString, 80, True);     End;     MyDbf.CreateTable;     MyDbf.Open;     MyDbf.AddIndex('custid', 'Id', [ixPrimary, ixUnique]);     { add a secondary index }     MyDbf.AddIndex('custname','Name', [ixCaseInsensitive]); finally     MyDbf.Free;   end; With Delphi, To add something in the database, I used TTable but there's not TTable in Lazarus. Can you give me a link to an exmaple of code with a database management. Thanks Lohot ---------------------------------------------------------------------- Vincent Snijders · 2007-01-16 12:11 Did you look at the Lazarus TDbf tutorial?