table.CLOSE Function


V Close()


Close an open table.


The <TBL>.CLOSE() method closes the currently open table referenced by the <TBL> object pointer. Note : You cannot close the primary table or set in a session. You cannot close a table pointer created with TABLE.CURRENT().

This script opens each table, prints the number of records it contains, and then closes the table.

dim name[3] as C
name[1] = "c:\a5\a_sports\customer.dbf"
name[2] = "c:\a5\a_sports\product.dbf"
name[3] = "c:\a5\a_sports\vendor.dbf"
for i = 1 TO 3
    tbl =[i])
    record_count = tbl.records_get()
    trace.write(name[i] + " has")
    trace.writeln(STR(record_count) + "records.")
next i

See Also