**************************************************************************** * * * CBData 0.2 - 14th December 1997 * * * * A CodeBase 6.x Compatible DataSet for Delphi 3.0 * * * **************************************************************************** CBData component package is FREEWARE... 1) Description --------------- CBData contains 2 components that encapsulate the CODE4 and DATA4 CodeBase structures: TCodeBase and TCBDataSet. The encapsulation of DATA4 structure (TCBDataSet) is derivated from TDataSet. That means that you can use all the Data Controls (DBGrid, DBMemo, ...) exactly as if you were using BDE. This beta-release was only tested with CodeBase 6.2 FoxPro DLL. !!! Note for CodeBase 6.3 users: !!! To make CBData work with CB 6.3, make sure that the CodeBase.DCU file provided with this package is used instead of the one packaged with Codebase 6.3. 2) What do you need to use CBData --------------------------------- 2.1 The CodeBase 6.x 32bits DLL, renamed to C4FOX32.DLL 2.2 The DCU and DFM files contained in this package 2.3 In Delphi 3, Select Component|Install Packages... and select CB62.DPL 3) Creating a sample application -------------------------------- 3.1 Put a TCodeBase (C4) component on your form Give it an Alias and a DataPath 3.2 Put a TCBDataSet (D4) component on your form Set the Master property to the TCodeBase Alias Select a TableName, and eventually an IndexName 3.3 Optionally set Query and/or a Sort order. 3.4 Set the TCBDataSet Active property to True 3.5 Put a TDataSource component on your form and link it to the TCBDataSet component 3.6 Add some Data controls and test it... 4) Feedback ------------ Feedback is greatly appreciated: by e-mail: nasdron@ibm.net Nicolas Nasdrovisky 5) Components overview ---------------------- 5.1 TCodeBase - Encapsulation of the CODE4 structure properties (mainly encapsulation of CODE4 fields): ----------- AccessMode: TCODE4AccessMode; Alias: String; DataPath: String; DateFormat: String; ErrorCode: Integer; FileFlush: Boolean; LockAttempts: Integer; LockAttemptsSingle: Integer; LockDelay: Integer; LockEnforce: Boolean; Log: TCODE4Log; Optimize: TCODE4Optimize; OptimizeWrite: TCODE4Optimize; ReadOnly: Boolean; Safety: Boolean; SingleOpen: Boolean; TranStatus: Integer; UnlockAuto: TCODE4UnlockAuto; methods (mainly encapsulation of CODE4 functions): -------- Close: Integer; ClearError; Create(AOwner: TComponent); Destroy; Flush: Integer; Lock: Integer; LockClear; LogCreate(Name: String; UserId: String): Integer; TranCommit: Integer; TranRollBack: Integer; TranStart: Integer; Unlock: Integer; 5.2 TCBDataSet - Encapsulation of the DATA4 structure properties: ----------- Active: Boolean; Handle: DATA4; IndexName: String; Master: String; Query: String; Sort: String; TableName: String; ToggleDelete: Boolean; + inherited TDataSet properties (Active, BOF, EOF, RecordCount, State, ...) events: ------- BeforeOpen; AfterOpen; BeforeClose; AfterClose; BeforeInsert; AfterInsert; BeforeEdit; AfterEdit; BeforePost; AfterPost; BeforeCancel; AfterCancel; BeforeDelete; AfterDelete; BeforeScroll; AfterScroll; OnCalcFields; methods (mainly encapsulation of DATA4 functions): -------- Create(AOwner: TComponent); Destroy; Deleted: Boolean; Flush; GetTags: TStringList; GetTables: TStringList; IsSequenced: Boolean; Lock; Pack; Recall; Seek(Key: String): Boolean; SeekNext(Key: String): Boolean; SeekDouble(Key: Double): Boolean; SeekNextDouble(Key: Double): Boolean; Unlock; Zap; + inherited TDataSet methods (Open, Close, First, Last, Next, FieldByName, ...) 6) Source code availability --------------------------- For 100 USD, get the full source code of this release and all the future releases of CBData components. To receive the sources by e-mail, please contact: Nicolas Nasdrovisky route de Paturages, 5A B7080 NOIRCHAIN Belgium e-mail: nasdron@ibm.net and send an international transfer to account #: 063-1134963-01 Bank address: Credit Communal de Belgique Boulevard PACHECO, 44 1000 BRUXELLES Belgium Swift-code: GKCCBEBB 7) Changes ---------- V0.1 - 1st novembre 1997 ---- - First release V0.2 - 14th decembre 1997 ---- - Lookup fields are now working. - New function: LogCreate. - Transactions support. - A few bugs removed: - Record positioning after Post. 8) Credits ---------- Many thanks to: Chalie Zha, for the great "lookup" code.