Returns the number of fields in a record for the table referenced by <TBL>. The FIELDS_GET() method is most useful when you do not know much about the table you are using. After determining the Number_of_Fields available, you can then get an object pointer to each field in the table using the <TBL>.FIELD_GET() method.
This script opens the Customer table, displays the number of fields in each record, and then prints a list of the field names in the Trace window.
dim tbl as P tbl = table.open("c:\a5\a_sports\customer.dbf") field_count = tbl.fields_get() trace.writeln("Fields in table:" + STR(field_count)) for i = 1 TO field_count fld = tbl.field_get(i) trace.writeln(fld.name_get()) NEXT I tbl.close()