Home > Tools User's Guide > HB++ Data Access Objects > Reference

HB_Recordset Class

  + HB_Recordset

Description

The HB_Recordset class implements the necessary methods to manipulate the content of Palm databases the structure of which matches a HB++ table. Since a mapping has to be established between the record data and the fields of the table, it is necessary to specify the structure of the table corresponding to the.pdb when opening it. It is done by providing a path to the.hbx file, or a Table Digest.

At any moment, only one record is accessible through the HB_Recordset object. A cursor is used to determine which record is active, and to navigate through all the records. This cursor is managed by the AbsolutePosition, MoveFirst, MoveLast, MoveNext and MovePrevious methods. The BOF and EOF properties are used to determine if the cursor is positioned before the first record or after the last one. You can use these indicators to exit a loop which steps through all the records, for example.

If the table is open for writing, the AddNew method adds a new record, while the Edit method switches the HB_Recordset object to edit mode. You can then modify the value of the fields, and the Update method validates these modifications.

It is not advised to create several HB_Recordset objects accessing the same.pdb file at the same time. When a recordset is no longer needed, it should be closed with the Close method.

Members

MembersDescription
AbsolutePosition Absolute position of the current record within the table.
AddNew Adds a new record.
AppInfoBlock Retrieves or modify the content of the application info block.
Blank Empties the contents of a record.
BOF Indicates whether the cursor is positioned before the first record in the recordset.
CancelUpdate Cancels the modifications carried out on the current record.
Close Closes the Palm database currently opened.
CreateHBBitmap Convert an OLE picture into a HB++ bitmap stored in a byte array.
CreateOlePicture Convert a HB++ bitmap in a byte array to a standard OLE picture object.
CreateTable Creates and opens an empty Palm database and.pdb file.
Delete Deletes the record on which the cursor is positioned.
Edit Switch to the edit mode.
EOF Indicates whether the cursor is positioned after the last record in the recordset.
Field Accesses the value of a field.
FieldByIndex Gets or modifies the value of a field, referenced by its index.
FieldCount Number of fields in the table.
FieldName Name of a field in the table.
LookupUniqueID Moves the cursor to the record identified by its UniqueID primary key.
MoveFirst Moves the cursor to the first record.
MoveLast Moves the cursor to the last record.
MoveNext Moves the cursor to the next record.
MovePrevious Moves the cursor to the previous record.
OpenTable Opens a Palm database contained in a.pdb file.
RecordCount Number of records in the recordset.
SortInfoBlock Retrieves or modify the content of the sort info block.
Update Updates a database record.

System requirements

SystemMinimal versionRemarks
Palm OSPalm OS 3.0N/A