COLLECTION.FROM_TABLE Function
Syntax
V From_Table(C tablename,C keyfieldname,C datafieldname)
Arguments
- tablenameCharacter
The fully specified table name with drive and path.
- keyfieldnameCharacter
The name of the field that provides the collection key value.
- datafieldnameCharacter
The name of the field that provides the collection element value.
Description
Populate a collection from a table.
Discussion
The <COLLECTION>.FROM_TABLE() method populates a collection with data from a table.
Example
dim customers as U
dim t as P
dim filename as C
t = table.open("customer")
filename = t.filename_get()
customers.from_table(filename, "customer_id", "lastname")
? customers.get("00000003")
= "Rebo"See Also