The data model of HanDBase is very simple: A table in the relational model is a "database" in HanDBase jargon. It consists of a number of rows of identical format. Each record is identified by a number in the range [0..n-1]
To access a field value, you have to specify database name, record number and field number. The function hb-info retrieves catalog information of a database like number of records and types names and attributes of all fields.
There are no selection or filter functions, you have to traverse the entire database table to find a record.
Unfortunately, there's no clear distinction between internal and external data formats (all data is stored as strings in HanDBase), type conversion and syntax checking is done in various places in HanDBase. These problems get worse, as the formatted data is stored, so databases using different locales are not easily exchangable. Have a look at the sample how to parse the strings returned from HanDBase.
HanDBase provides limited relations between tables, i.e. a 1:n relationship. A record in table A can reference a set of records in table B and you can use the function hb-getlinks to retrieve the entire set. Unfortunately there's no function to go backwards, i.e. find the owner of the current record.
DDH Software changed the HanDBase API structures totally when introducing version 3. LispMe now supports both versions 2 and 3 of HanDBase. It automatically detects the version installed. If both versions are found, V3 is used. Use hb-version to detect the version used.
numerical value | symbol | description |
---|---|---|
0 | HB_FIELD_NOT_USED | unused |
1 | HB_STRING_FIELD | string |
2 | HB_DECIMAL_FIELD | numeric decimal (includes int) |
3 | HB_FLOAT_FIELD | numeric floating point |
4 | HB_POPUP_FIELD | selection list |
5 | HB_CHECKBOX_FIELD | boolean |
6 | HB_UNIQUE_FIELD | unique int given by system |
7 | HB_IMAGE_FIELD | image, not supported |
8 | HB_DATE_FIELD | date |
9 | HB_TIME_FIELD | time |
10 | HB_LINK_FIELD | 1:n relation |
11 | HB_LINKED_FIELD | target of 1:n relation |
12 | HB_NOTE_FIELD | string |
13 | HB_HEADING_FIELD | header in HanDBase editor |
14 | HB_LINKLIST_FIELD | value read once from another table |
15 | HB_CALCULATED_FIELD | calculated by HanDBase |
error code | description | remarks |
---|---|---|
2 | Couldn't find database | Names are case-sensitive |
3 | Couldn't open database | |
4 | Error reading record info | |
5 | Error reading record | Index out of range |
6 | Not a link field | Can't use hb-getlinks |
You should never see another error code, please mail me.
hb-addrecord | hb-dir | hb-info | hb-getfield |
hb-getlinks | hb-setfield | hb-version |