- {******************************************************************************
- * ravageidb.pas v0.1 for Kylix3 and Delphi7
- * Copyright (c) 12th july 2007 by alvaro Hermo <alvaro.h@ifrance.com>
- *
- * ravagedb database is under the terms of the GNU General Public License
- * please see licence.txt
- *
- * depend of ravagelib.pas
- *
- *
- * exemple:
- *
- * procedure TForm1.FormCreate(Sender: TObject);
- * Var
- * db : TRavageiDB; // ravage database
- * id,id0 : Integer;
- * begin
- * db := TRavageiDB.create;
- * if Not FileExists('database.dat') then
- * db.init('database.dat', 'driver,car,track,version,conditions,date',
- * '19,13,4,19,1,6',
- * 's,s,s,s,I,i' );
- * db.load('database.dat');
- *
- * // to add an element
- * id0 := db.add;
- * db.update(id0,'driver','gaston');
- * db.update(id0,'car','mac laren');
- *
- * // to find an element
- * db.add_finditem('driver','gaston','=');
- * db.add_finditem('car','mac laren*','like');
- *
- * id := db.findfirst();
- * while id <> 0 do
- * begin
- * Lst3Find.Items.Add(FloatToStr(id) + ' ' + db.get(id,'driver') + ',' +
- * db.get(id,'car'));
- * id := db.findnext();
- * end;
- *
- * // to remove an element
- * db.remove(id0);
- *
- * db.close;
- * end;
- *
- * NB: The Source Code is commented in french
- *****************************************************************************}
- unit ravageidb;
-
- interface
-
- uses
- SysUtils, StrUtils,
- QDialogs,QControls, // pour application CLX
- //Dialogs,Controls, // pour application windows
- ravagedb,ravagelib,pc1;
-
- const
- KEY_BYTES = 3; // de 1 a 4 1:256 2:65536 3:8388608 4:4294967296
- --------------------------------------------------
- dans ravagedb
- RESERVE_SPACE = 2048; // de 0 a 65535 espace RAM de reserve.
{******************************************************************************
* ravageidb.pas v0.1 for Kylix3 and Delphi7
* Copyright (c) 12th july 2007 by alvaro Hermo <alvaro.h@ifrance.com>
*
* ravagedb database is under the terms of the GNU General Public License
* please see licence.txt
*
* depend of ravagelib.pas
*
*
* exemple:
*
* procedure TForm1.FormCreate(Sender: TObject);
* Var
* db : TRavageiDB; // ravage database
* id,id0 : Integer;
* begin
* db := TRavageiDB.create;
* if Not FileExists('database.dat') then
* db.init('database.dat', 'driver,car,track,version,conditions,date',
* '19,13,4,19,1,6',
* 's,s,s,s,I,i' );
* db.load('database.dat');
*
* // to add an element
* id0 := db.add;
* db.update(id0,'driver','gaston');
* db.update(id0,'car','mac laren');
*
* // to find an element
* db.add_finditem('driver','gaston','=');
* db.add_finditem('car','mac laren*','like');
*
* id := db.findfirst();
* while id <> 0 do
* begin
* Lst3Find.Items.Add(FloatToStr(id) + ' ' + db.get(id,'driver') + ',' +
* db.get(id,'car'));
* id := db.findnext();
* end;
*
* // to remove an element
* db.remove(id0);
*
* db.close;
* end;
*
* NB: The Source Code is commented in french
*****************************************************************************}
unit ravageidb;
interface
uses
SysUtils, StrUtils,
QDialogs,QControls, // pour application CLX
//Dialogs,Controls, // pour application windows
ravagedb,ravagelib,pc1;
const
KEY_BYTES = 3; // de 1 a 4 1:256 2:65536 3:8388608 4:4294967296
--------------------------------------------------
dans ravagedb
RESERVE_SPACE = 2048; // de 0 a 65535 espace RAM de reserve.