Table Object Functions and Methods

IN THIS PAGE

Description

Available functions and methods for the Table objects.

Name
Description
Contrasting TABLE.OPEN with TABLE.CURRENT and TABLE.GET

TABLE.OPEN() opens a new instance of a table. This new instance has its own record pointer, queries, etc. TABLE.CURRENT() and TABLE.GET(), on the other hand, get a pointer to an already open table. These methods do not open a new instance of that table.

-> (Parent Child Relationship)

When you need to provide a fully qualified field name in an expression, you place -> between the Table_Name and Field_Name. This is necessary when an expression contains references to fields in multiple tables or when an expression does not have a table context that supplies a default value for Table_Name.

TABLE.CREATE_END Function

The TABLE.CREATE_END() method completes the definition of a table structure that was initiated by the TABLE.CREATE_BEGIN() method, creates the table file, and returns a pointer. After the table file is created, it is opened and ready for use.

 Related Functions and Methods

RECORD_DELETE Function

Deletes one or more record(s) in a table that match the filter condition

ENTER_RECORD Method

Allows for data to be entered when using Xbasic with a Form or Browse. Returns a dot variable that is the validation object.

CHANGE_RECORD Method

Allows for data to be changed via Xbasic, when using a Form or Browse. Returns a dot variable that is the validation object.

DELETE_RECORD Method

Allows for data to be deleted via Xbasic, when using a Form or Browse. Returns a dot variable that is the validation object.

Methods

TABLE.ACTUAL_FILENAME_GET Method

Get the physical (master) filename of the table, if name specified, returns full path to provided database name.

TABLE.ADD_BLANK_RECORDS Method

Adds blank records to a DBF table.

TABLE.ADD_FIELDS Method

Adds fields to a table. New_fields is a crlf list of fields to be added in format: fieldname,type,size,decimals

TABLE.APPEND Method

Append the records of one table to another, optional argument provides a quick way to append records of exact same table structure. Specify the required values in the Append dot variable, then use the following command: <TBL>.APPEND()

TABLE.BATCH_BEGIN Method

Lock database file for batched changes.

TABLE.BATCH_END Method

Unlocks database file after batched changes.

TABLE.BOF Method

Returns TRUE if we are on the first record of the specified (or current) search order.

TABLE.CHANGE_BEGIN Method

Begin changes to tables current record.

TABLE.CHANGE_END Method

End changes to tables current record.

TABLE.CHILD_GET Method

Returns names of children of table [or a single child if number is provided].

TABLE.CLOSE Method

Close an open table.

TABLE.COMPACT Method

Compact DBF,SET,DDD,ALB files.

TABLE.COPY Method

Copy all or some of the fields from the table to another table or set.

TABLE.COPY_RECORD_TO Method

Copies current record to another table with similar structure as current table.

TABLE.COPY_RECORDS_TO Method

Copies records to another table with similar structure

TABLE.CREATE_BEGIN Method

Start defining a new Table, defines the first field.

TABLE.CREATE_CLONE Method

Create an empty copy of the table.

TABLE.CREATE_SHADOW Method

Create a shadow table - the shadowfilename is the table created, it points to the actualfilename.

TABLE.CROSSTAB Method

Cross tabulate records of database into result database.

TABLE.CURRENT Method

The TABLE.CURRENT() method returns an object pointer to an open table in the current session. Use TABLE.CURRENT()without a parameter to return a pointer to the session's primary table. If no table is found in a particular slot, TABLE.CURRENT()creates an invalid object pointer. You can test the validity of an object pointer using the IS_OBJECT() function. You can also get a pointer to an open table using the TABLE.GET() method. For example, if you have opened a set and you want to get a pointer to one of the child tables in the set, (say "Invoice_Items"), you could use this command:

TABLE.DECRYPT Method

Decrypt a database file.

TABLE.DELETE Method

Mark the current record for deletion.

TABLE.DELETE_DUPS Method

Deletes the duplicate records in the table.

TABLE.DELETE_FIELDS Method

Removes fields from a table. Field_list is a crlf list of fields to be removed.

TABLE.DELETE_RANGE Method

Delete a range of records in the table.

TABLE.DUPLICATE Method

Create a copy of the table, with all records and layouts.

TABLE.ENCRYPT Method

Encrypt a database file.

TABLE.ENCRYPTED Method

Returns TRUE if table is encrypted.

TABLE.ENUM_OPEN Method

Enumerate all open tables.

TABLE.ENUM_SESSION_OPEN Method

Enumerate all open tables in the current session.

TABLE.ENUM_SYNTAX Method

Enumerate ODBC driver syntax elements.

TABLE.EOF Method

Returns TRUE if we are on the last record of the specified (or current) search order.

TABLE.ERASE Method

Delete the table if safety is TRUE.

TABLE.EVAL Method

Evaluate an expression in the context of the table.

TABLE.EVAL_VALID Method

Returns TRUE if expression is valid in the context of the table.

TABLE.EXPORT Method

Export records in table to specified output file.

TABLE.EXTERNAL_CALCS_GET Method

The TABLE.EXTERNAL_CALCS_GET() method returns a list of externally defined calculated fields for a table.

TABLE.EXTERNAL_FIELD_INFO_GET Method

Retrieve external tables field names (and other optional info) in a cr-lf separated list. format same as External_Field_Name_Get().

TABLE.EXTERNAL_FIELD_NAME_GET Method

Retrieve external tables field names (and other optional info) in a cr-lf separated list.

TABLE.EXTERNAL_INDEX_DEF_ENUM Method

Retrieve all tags a table or setname and description - format A=Active E=Error N=Name P=Filename O=order,F=filter,X=all flags, U=nique, D=escending, I=Insensitive T=Type.

TABLE.EXTERNAL_INDEX_DEF_FROM_NAME_GET Method

Retrieve a external tag information given a table or setname and description - format E=Error P=Filename O=order,F=filter,X=all flags, U=Unique, D=escending, I=Insensitive T=Type.

TABLE.EXTERNAL_INDEX_NAME_GET Method

Retrieve external tables index tag names in a cr-lf separated list.

TABLE.EXTERNAL_RECORD_CONTENT_FROM_KEY_GET Method

Retrieve external tables records in a cr-lf separated list given a list of records or keys.

TABLE.EXTERNAL_RECORD_CONTENT_GET Method

Retrieve external tables records in a cr-lf separated list.

TABLE.External_Suggest Method

Returns a list of suggestions from a field or expression in a table.

TABLE.EXTERNAL_VARIABLES_GET Method

The TABLE.EXTERNAL_VARIABLES_GET() method returns a list of externally defined variables.

TABLE.FETCH_EOF Method

The <TBL>.FETCH_EOF() method returns TRUE (.T.) if the most recent fetch in the table or set referenced by the <TBL> object pointer has tried to read past the end of the file, creating an end of file condition. The meaning of end of file differs depending on how the records are currently arranged through the primary index, active range, or current query list. The end of file condition occurs when trying to read beyond the first or last physical record (in record number order), or beyond the first or last record in the current ordering and selection of records.

TABLE.FETCH_FIND Method

Using the current index, find specified key value, return record number.

TABLE.FETCH_FIRST Method

Fetch the first record in the table/set. returns TRUE if record found.

TABLE.FETCH_GOTO Method

Goto a specific record number in the table, returns positive if record found, else negitive record number.

TABLE.FETCH_LAST Method

Fetch the last record in the table/set. returns TRUE if record found.

TABLE.FETCH_LOC_NEXT Method

Locate the next value/pattern if the field specified.

TABLE.FETCH_LOC_PREV Method

Locate the previos value/pattern if the field specified.

TABLE.FETCH_NEXT Method

Fetch the next record in the table/set. returns TRUE if record found.

TABLE.FETCH_PREV Method

Fetch the previous record in the table/set. returns TRUE if record found.

TABLE.FIELD_ADD Method

Define the next field in a table.

TABLE.FIELD_BLANK Method

Places a blank value in the field specified.

TABLE.FIELD_GET Method

Get a field given a name or index into current Table.

TABLE.FIELD_INFO_DUMP Method

Displays a CRLF delimited list of info about fields in the table. Format is same format as 'table.external_field_name_get()'

TABLE.FIELD_NAME_GET Method

Retrieve field names in a cr-lf separated list.

TABLE.FIELD_SPACE_USAGE Method

Visits all records and dumps field name + space used.

TABLE.FIELD_STATISTICS Method

Collects statistics for passed in expression/field.

TABLE.FIELDNAME_CHANGE Method

Change the names of fields in a table without restructuring the table.

TABLE.FIELDS_GET Method

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.

TABLE.FILE_MODE_GET Method

Get the sharing mode of the file the table.

TABLE.FILENAME_GET Method

Get the filename of the table, if name specified, returns full path to provided database name.

TABLE.GET Method

The TABLE.GET() method takes the Alias of an open table and returns an object pointer to this table. Use this method when you know the alias of a open table, but you do not have a pointer to it. You need a pointer to a table to use any of the methods to manipulate a table. To obtain a pointer to a table when you do not know the alias name, use the TABLE.CURRENT() method.

TABLE.Get_Cursor Method

Returns 'cursor' for table (keeps own position).

TABLE.GET_GROUP_NAME Method

Returns name of associated groups (table or report level if defined).

TABLE.GET_INDEX_EXTENSION Method

Returns the Index file extension that would be associated with the passed in Table extension.

TABLE.GET_MEMO_EXTENSION Method

Returns the Memo file extension that would be associated with the passed in Table extension.

TABLE.GET_SOURCE_TYPE Method

Returns the type of source the table is - Native, ODBC , Native-Encrypted.

TABLE.GET_SYNTAX Method

Get syntax for an ODBC setting.

TABLE.HANDLE Method

Get the tables an old style 'handle'.

TABLE.HANDLE_SET Method

Given an old style 'handle', set the table pointer.

TABLE.HANDLES_IN_USE Method

Get a crlf-delimited string of table handles in use.

TABLE.IMPORT Method

Import records from specified input file to the table.

TABLE.IMPORT_ASCII_TABLE Method

Imports a fixed length ascii file into an existing table. Ascii file must match the structure of the table. If ascii file has fieldnames, set skip_lines to 1

TABLE.IN_USE Method

Returns true if the named table/library is in use (does exclusive open test).

TABLE.INDEX_ADD Method

The .INDEX_ADD() method adds another index tag to the index file created by TABLE.INDEX_CREATE_BEGIN() .

TABLE.INDEX_CREATE_BEGIN Method

Begin creation of a new index, add the first tag.

TABLE.INDEX_CREATE_END Method

Complete creation of an index.

TABLE.INDEX_GET Method

Returns an index given a name.

TABLE.INDEX_NAME_GET Method

Retrieve open index tag names (from 1 to n) - if parameter ommitted, report ALL names.

TABLE.INDEX_OPEN Method

Open an index file for the database.

TABLE.INDEX_PRIMARY_GET Method

Get the primary index for the table.

TABLE.INDEX_PRIMARY_PUT Method

Set the primary index for the table, using either name or Index object.

TABLE.INDEX_RECORD_GET Method

Get the record number order index object for a table.

TABLE.INDEX_TAG_ADD Method

Add a tag to the production index for the database.

TABLE.INTERSECT Method

Create a new table that is the intersection between the table and a secondary table.

TABLE.IS_DELETED Method

Is the current record Deleted.

TABLE.IS_MARKED Method

Is the current record Marked.

TABLE.IS_RECORD_LOCKED Method

return TRUE if the record is locked.

TABLE.IS_UNMARKED Method

Is the current record Unmarked.

TABLE.IS_VALID Method

Is the current table valid.

TABLE.ISOPEN Method

Test if a table is open - return .T. if table is currently open.

TABLE.JOIN Method

Create a new table by merging the records from the table with a secondary table.

TABLE.LINK_EXPR_GET Method

The .LINK_EXPR_GET() method returns the expression that links two tables in a set.

TABLE.LINK_FILTER_EXPR_GET Method

The .LINK_FILTER_EXPR_GET() method returns the filter expression set when linking two tables in a set.

TABLE.LINK_INDEX_FLAGS_GET Method

The .LINK_INDEX_FLAGS_GET() method returns the options set when linking two tables in a set.

TABLE.LOGICALRECORD_GET Method

Gets the current record's logical position in the current sort order

TABLE.LOGICALRECORD_SET Method

Sets the record pointer to a logical record number in the current sort order. Returns .t. if the requested logical record number exits, else .f.

TABLE.MARK Method

Mark the current record.

TABLE.MARK_DUPS Method

Marks the duplicate records in the table.

TABLE.MARK_DUPS2 Method

Marks the duplicate records in the table, including the original record.

TABLE.MARK_RANGE Method

Mark a range of records in the table.

TABLE.MEMO_CHECK Method

Validate the structure of a memo file flags (v-alidate,f-ilemapping,fs-file mapping with sample,r=# - start at record).

TABLE.MERGE_DATA Method

 

TABLE.MODE_GET Method

Get the data entry mode for the table.

TABLE.MOVE Method

Moves forward or backwards the specified NumberOfRecords in the current sort order. Returns the record number of the target record.

TABLE.MOVE_RECORD_TO Method

Moves the current record to another table with the same structure.

TABLE.MOVE_RECORDS_TO Method

Moves records to another table with similar structure

TABLE.NAME_GET Method

Get the name or alias of the table.

TABLE.NAME_NORMALIZE Method

Normalize a table name.

TABLE.OPEN Method

Open an existing table.

TABLE.OPEN_SESSION Method

Open an existing table in a new session.

TABLE.OPENMAP Method

Creates a pointer to an open table and only contains the fields specified in the fieldList.

TABLE.ORDER Method

Orders and (optionally) filters a DBF table.

TABLE.PACK Method

Removes all the records that are marked for deletion.

TABLE.PARENT_GET Method

Returns name of the parent table.

TABLE.PARENT_LINK_EXPR_GET Method

Returns the parent linking expression.

TABLE.PERSIST Method

Flags opened table to not be closed automatically on termination of script.

TABLE.POPULATE_FROM_STRING Method

Populate a table from a string.

TABLE.POPULATE_GRID Method

Populate via arrays a grid - use $row$ and $column$ as placeholders for the row/column index.

TABLE.POST Method

Specify the required values in the Post dot variable, then use the following command:

TABLE.PREVIOUS_RECORD Method

Returns the previous record data entry was performed on.

TABLE.QUERIES_REOPEN Method

Reopen the queries in a session.

TABLE.QUERY_CREATE Method

Create a new query - flags (N)ot remembered - if optional order and filter expressions are specified, then the query variable is ignored. The <TBL>.QUERY_CREATE() method orders and selects data from the table referenced by <TBL>. Originally, you specified the selection criteria, order expression and query options by setting the values of the query variables ( query.description, query.order, etc.). In more modern, robust usage you specify the optional function arguments instead. Once you have set the query variables, use the <TBL>.QUERY_CREATE() method to run the query. An object pointer, <INDEX>, is returned. <INDEX> will reference either:

TABLE.QUERY_DETACH Method

Detach current query (or named query if specified).

TABLE.QUERY_DETACH_ALL Method

Detach all queries.

TABLE.QUERY_FROM_RANGE Method

Create a query from the current range, if one is in effect - returns .T. if new query created.

TABLE.QUERY_PRIMARY_PUT Method

Returns existing query if already run, else runs and returns saved query.

TABLE.RANGE_ADD Method

Add a range filter to the table.

TABLE.RANGE_DROP Method

Drop the current range from the table.

TABLE.RECALC_CALCFIELDS Method

Recalculates all calc fields defined in Field Rules

TABLE.RECNO Method

Return the current record for the table.

TABLE.RECORD_CLONE Method

Create a new record using the fields from a similar table.

TABLE.RECORD_CONTENT_GET Method

Retrieve record data in a cr-lf separated list.

TABLE.RECORD_DATA_GET Method

Return the all the data from the current records field as a blob.

TABLE.RECORD_DATA_SET Method

Set all the feilds int the current record using data from a blob.

TABLE.RECORD_TO_VARS Method

convert a record to a set of variables in vars

TABLE.RECORDS_DELETED Method

Returns a count of the records deleted.

TABLE.RECORDS_GET Method

Returns the number of records in the table.

TABLE.REFERENCE_EXPRESSION_GET Method

Get the expression needed to reconstruct a pointer.

TABLE.REFRESH Method

Perform network refresh, return True if changed.

TABLE.RELATED_TABLES_GET Method

Return the tables in a set that can be represented with a lookup expression to the table.

TABLE.RELATION_ADD Method

Add a relation to a table.

TABLE.RELATION_CHANGE Method

Change a relation's settings.

TABLE.RELATION_DROP Method

Remove a relation from a table.

TABLE.RELATION_GET Method

Returns the tables relation type (Single/Many).

TABLE.RELATION_TAG Method

Builds and Returns an index handle for the relation_change and relation_add commands.

TABLE.REMVE_RECS_IN_LIST Method

Removes the records Remove_List from the Primary_table. Records are matched on the Primary_table_key

TABLE.RENAME Method

Renames the table.

TABLE.RESET Method

Open the primary table for the session.

TABLE.RULES_GET Method

Provides access to the tables field rules.

TABLE.SEND Method

Zip and send a table. Options "d" - include Dictionary, "x" - include Indexes, "p" - display prompt dialog, "c" - compress before sending.

TABLE.ServerSide_Records_Get Method

Returns the number of records in an active-link table. Faster than <tbl>.Records_Get() because it does not cause the local record cache to become fully populated.

TABLE.SESSIONHANDLE Method

Return the session that the table is opened under.

TABLE.SET_CREATE Method

Use the current table to define a new set of provided filename.

TABLE.SUBTRACT Method

Create a new table of records not common to table and secondary table.

TABLE.Suggest Method

Suggest a list of possible values given a sample value (to drive auto-complete).

TABLE.SUMMARIZE Method

Summarize the records of the table into a specified output table.

TABLE.TEMPORARY_CLOSE Method

Close temporary tables (ignores non-cached tables).

TABLE.TEMPORARY_OPEN Method

Opens temporary tables for caching.

TABLE.to_sql_expression Method

If convertable to a SQL level expression, return than expression.

TABLE.to_sql_filter Method

If expression can be converted in whole OR partically to a SQL order, return the SQL portion, or both portions if a separator is provided.

TABLE.to_sql_order Method

If expression can be converted in whole OR partically to a SQL filter, return the SQL portion, or both portions if a separator is provided.

TABLE.UNDELETE Method

Un-delete records in a table

TABLE.UNMARK Method

Unmarks the current record.

TABLE.UNMARK_DUPS Method

Unmarks the duplicate records in the table.

TABLE.UNMARK_RANGE Method

Unmark a range of records in the table.

TABLE.UPDATE Method

Update all records in table using expressions.

TABLE.UPDATE_PRODUCTION_INDEX Method

Update the production index associated with the table.

TABLE.XML_EXPORT Method

Exports data from a table to an XML file. Specify * to export all fields.

TABLE.ZAP Method

Delete all the records in the table if safety is TRUE.

TABLE.ZIP Method

Zip a table.

TBL.ENTER_BEGIN Method

Initiates an Enter operation to add a new record.

TBL.ENTER_END Method

Completes the creation of a new table record.

TBL.NAME_REAL_GET Method

Returns the Table_Name of the table referenced by <TBL>.

TBL.NEED_REFRESH Method

Returns true when a refresh is needed

See Also