![Asentria Teleboss 850 User Manual Download Page 178](http://html.mh-extra.com/html/asentria/teleboss-850/teleboss-850_user-manual_2981745178.webp)
TeleBoss 850 2.06.280_STD User Manual
Page 172
Returns
Returns the record count, or 'nil' if unsuccessful.
Example
-- get count of records in file
print(a_lib.DBGetRecordCount("file1"))
1281
-- get count of records in entire database
print(a_lib.DBGetRecordCount())
13112
a_lib.DBLockFile, a_lib.DBUnlockFile
Description
Locks or unlocks a database file. Locking a database file prevents records from being polled or deleted by another
script or process.
Syntax
a_lib.DBLockFile(file)
a_lib.DBUnlockFile(file)
file: The file to be locked or unlocked
Returns
Returns 1 if successful, or 'nil' if unsuccessful.
a_lib.DBPostRecord
Description
Posts a record to the database. The record can be posted directly to the database, or it can be routed through the
data filters and/or data alarms.
Syntax
a_lib.DBPostRecord(table)
table: Contains the following items:
numlines: How many lines the record contains (required)
dest: The destination file ("file1", "alarms", etc) (required)
time: Timestamp (seconds since Epoch) (optional)
serial: Serial number (optional)
do_filter: Use data filters (true/false) (optional, default is false)
do_alarm: Use data alarms (true/false) (optional, default is false)
1..n: Indexed record data as ASCIIZ data (required)
Returns
Returns 'true' if the record was successfully posted, or 'nil' if not.
Summary of Contents for Teleboss 850
Page 6: ......