beautypg.com

13 database operations – Rice Lake iRite IDE User Manual

Page 75

background image

920i

Programming Reference - API Reference

71

5.13 Database Operations

.Add

Adds a record to the referenced database. Using this function invalidates any previous sort operation.

Method Signature:
function .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.

.Clear

Clears all records from the referenced database.

Method Signature:
function .Clear : SysCode;

SysCode values returned:

SysNoSuchDatabase

The referenced database cannot be found.

SysOK

The function completed successfully.

.Delete

Deletes the current record from the referenced database. Using this function invalidates any previous sort
operation.

Method Signature:
function .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 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 .FindFirst or .FindLast.

.FindFirst

Finds the first record in the referenced database that matches the contents of column I.

Method Signature:
function .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.

.FindLast

Finds the last record in the referenced database that matches the contents of column I.

Method Signature:
function .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.

This manual is related to the following products: