Introduction
With CPDB, you can dynamically create a structured database and add, modify or remove the records which it contains. Usually, these treatments requires tens of lines of code.
To create a CPDB database
Here an example which shows with which facility you can create a CPDB database:
// Create user base |
The data base is thus created in only one line of code.
The mask of description is described in detail in the documentation of CPDB_CreateDatabase.
Add a record
The addition of a record is carried out in only one line of code :
// Create a new record |
The variable "handle" corresponds to the handle of a beforehand open database.
If no record had been read previously, then a blank recording is created, if not, the new record is a copy of the currently record readed (or modified).
To be sure to create a blank record use function CPDB_Clear.
To delete a record, use the fonction CPDB_DeleteRecord.
Modification of a record
The fields of a record can by the use of the functions CPDB_WriteShortInt, CPDB_WriteInt, CPDB_WriteLongInt et CPDB_WriteString.
Once the modified fields, the record should either be updated by CPDB_updateRecord, or to create a new record by CPDB_AddRecord.
Err errNo; |
More informations