13 database operations – Rice Lake iRite IDE User Manual
Page 75
920i
Programming Reference - API Reference
71
5.13 Database Operations
<DB>.Add
Adds a record to the referenced database. Using this function invalidates any previous sort operation.
Method Signature:
function <DB>.Add : SysCode;
SysCode values returned:
SysNoSuchDatabase
The referenced database cannot be found.
SysDatabaseFull
There is no space in the specified database for this record.
SysOK
The function completed successfully.
<DB>.Clear
Clears all records from the referenced database.
Method Signature:
function <DB>.Clear : SysCode;
SysCode values returned:
SysNoSuchDatabase
The referenced database cannot be found.
SysOK
The function completed successfully.
<DB>.Delete
Deletes the current record from the referenced database. Using this function invalidates any previous sort
operation.
Method Signature:
function <DB>.Delete : SysCode;
SysCode values returned:
SysNoSuchDatabase
The referenced database cannot be found.
SysNoSuchRecord
The requested record is not contained in the database.
SysOK
The function completed successfully.
The following <DB.Find> functions allow a database to be searched. Column I is an alias for the field name,
generated by the "Generate iRev import file" operation. The value to be matched is set in the working database
record, in the field corresponding to column I, before a call to <DB>.FindFirst or <DB>.FindLast.
<DB>.FindFirst
Finds the first record in the referenced database that matches the contents of <DB> column I.
Method Signature:
function <DB>.FindFirst (I : Integer) : SysCode;
SysCode values returned:
SysNoSuchDatabase
The referenced database cannot be found.
SysNoSuchRecord
The requested record is not contained in the database.
SysNoSuchColumn
The column specified by
I
does not exist.
SysOK
The function completed successfully.
<DB>.FindLast
Finds the last record in the referenced database that matches the contents of <DB> column I.
Method Signature:
function <DB>.FindLast (I : Integer) : SysCode;
SysCode values returned:
SysNoSuchDatabase
The referenced database cannot be found.
SysNoSuchRecord
The requested record is not contained in the database.
SysNoSuchColumn
The column specified by
I
does not exist.
SysOK
The function completed successfully.