![Asentria Teleboss 850 Скачать руководство пользователя страница 177](http://html.mh-extra.com/html/asentria/teleboss-850/teleboss-850_user-manual_2981745177.webp)
TeleBoss 850 2.06.280_STD User Manual
Page 171
Example
-- get count of records in file
print(a_lib.DBGetRecordCount("file1"))
1281
-- delete 10 records
count = a_lib.DBDeleteRecords("file1", 10)
print(count)
10
-- delete all records
count = a_lib.DBDeleteRecords("file1", "all")
print(count)
1271
a_lib.DBGetRecord
Description
Retrieves a record from a database file.
Syntax
a_lib.DBGetRecord(file, recnum)
file: The file that records are to be deleted from
recnum: Zero-based number of the record to retrieve
Returns
Returns the record data as a string, and the record length; returns 'nil' if unsuccessful or a record is not available.
Example
-- get the first record in FILE1
rec, length = a_lib.DBGetRecord("file1", 0)
-- print record
print(rec)
100300039 5718 385 7004 0
print(length)
65
a_lib.DBGetRecordCount
Description
Retrieves the count of records in a database file, or the entire database.
Syntax
a_lib.DBGetRecordCount(file)
a_lib.DBGetRecordCount()
file: The file to return the record count for; if not specified,
returns record count for entire database
Содержание Teleboss 850
Страница 6: ......