MyLittleBase - The Real StandAlone Database - ANIROM Multimédia |
![]() HowTo API Download Register info@anirom.com |
How to use my little database ? First copy the files MyLittleBase.dcu or MyLittleBasePro.dcu in your Delphi project's directory. Then add MyLittleBase or MyLittleBasePro to the uses line. It must seems to that: uses MyLittleBasePro, Forms, ...; Initialize the database by creating a new Table object: Var MyData: MyLittleTable; ... MyData := MyLittleTable.Create; ... MyData.Free; How to create a new database ? Use the AddField and AddRow functions to create a new database. First Initialize the database to be sure it is empty: MyData.Init; Then Create New Fields: MyData.AddField('Title'); MyData.AddField('Author'); Then add new values: MyData.AddRow; //adds a row to the table MyData.SetValue('Title', 'The Last of the Mohicans'); MyData.SetValue('Author', 'James Fenimore Cooper'); ... How to save a database ? Then Save your new database with SaveToFile: MyData.SaveToFile('sample.txt'); How to load a database ? To Read a database from a file: MyData.LoadFromFile('sample.txt'); |