docServerUserLandCom picture
Contents
Frontier Site

ubase.addRecord

Syntax ubase.addRecord (fnum, key, adrTable)

Params fnum is the file refnum identifying the uBASE database that a record will be added to.

key is the key under which to store the record being added.

adrTable is the Frontier database address of a table containing the data for the record (see Notes).

Action A record with the contents given by the table is stored in the database identified by fnum.

If a record already exists with the indicated key, that record is replaced by the new record.

Returns An essentially meaningless number.

Examples If the States Database is open and identified as fnum:
new (tableType, @rec)

rec.capi = "Olympia"

rec.abbr = "WA"

ubase.addRecord (fnum, "Washington", @rec)

This example adds the state named Washington whose capital is Olympia and whose abbreviation is WA to the States Database, replacing the existing record for Washington.

Errors An error is produce if uBASE is not running, if fnum does not identify an open database, if the table does not have entries for every field in the database, or if an entry is not of the correct type

Platform Notes uBASE runs only on Mac OS and is not a supported component of Frontier 5.0,

Notes ubase.addRecord requires a table. There is an entry in this table for each field in the database, with the same 4-character name as the field’s name. The value of each entry must be the same type as the field’s type; the value becomes the field’s value.

Extra entries in the table are ignored.

The key is by definition unique. It can be of any type which can be stored in a database field.

By default, upper case letters in the key are treated as lower case. See ubase.caseSensitive.

See Also ubase.caseSensitive

ubase.deleteRecord

ubase.lookupRecord


© Copyright 1992-2026 UserLand Software. Email: webmaster@userland.com.