The HanDBase API, known hereafter as HAPI,
was created to allow Palm OS software developers a simple way to interface
their applications with HanDBase Databases. An example of this implementation
is the PocketReport program,
which lets the user format a report template, and then grabs data from
selected HanDBase databases to print or email in the report.
Functions available for users are as follows:
HapiGetDBNames - Returns a list of HanDBase
databases installed to the handheld at the present time.
HapiGetDBInfo - Returns various information
about a specific HanDBase database, including the field names and types,
and the number of records in the database.
HapiGetFieldValue - Returns the text value
of a specific field in a specific record.
HapiGetLinkInfo - Returns the link information
for a specific field in a specific record (used in conjunction with HapiFindNextLinkedRecord).
HapiFindNextLinkedRecord - retrieves the
next linked record number that belongs to a specific link field.
HapiSetFieldValue - Set a specific field
of a specific record to a passed text value.
HapiSetRecordValue - Set all fields in
a specific record to an array of passed text values.
HapiGetRecordValue - Get all fields in
a specific record into an array of passed text values.
HapiCreateDatabase - Create a new HanDBase Database, using the database name, field names and types passed.
HapiAddRecord - Add a new record and set
all fields in a specific record to an array of passed text values.
adding HAPI capability to your Application
the HAPI Library from here.. Save the file and extract (using WinZIP, Stuffit, ZipCentral or 7-Zip) to your source directory.
the hapicall.h header file in your code. (eg, #include "hapicall.h")
3. Add the hapicall.c source file to your project or Makefile. The last routine in the file is an
exhaustive example of reading records from all databases, so you may want
to delete that function to save space in your final .PRC file.
4. Call the
wrapper functions in hapicall.c, making sure to pass the proper parameters,
and check the return values that come back.
That's all there
is to it! Please email firstname.lastname@example.org
with any questions you have, and please do let us know if you do implement
support for HanDBase in your application so that we may add a reference
to your program on our site.
If you are interested in software development using HanDBase as a tool, please visit our Developer's Resource Center. It is designed to provide the tools, documentation and SDKs needed in order to use key features of our products.