TABLE.EXTERNAL_INDEX_DEF_FROM_NAME_GET Function
Syntax
Arguments
- tablename
The name of the table or set.
- description
Character
- format
Character
- "E" = Error
- "P" = Filename
- "O" = Order
- "F" = Filter
- "X" = All flags
- "U" = Unique
- "D" = Descending
- "I" = Insensitive
- "T" = Type
Description
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.
Discussion
The TABLE.EXTERNAL_INDEX_DEF_FROM_NAME_GET() method retrieves external index information given a table or set name and description. This is very useful because it allows you to write Xbasic code that will check to see if a table's indexes match what they should be. If they do not match, then you can rebuild missing indexes. There are two functions. TABLE.EXTERNAL_INDEX_DEF_ENUM() returns the definition of all of the index tags in an index file. TABLE.EXTERNAL_INDEX_DEF_FROM_NAME_GET()returns the definition of a single index. Both of these return data for a table specified by Table_or_Set_Name (i.e. the table does not have to be open). There are also functions that allow you to get information about indexes if you have a pointer to an open table.
Example
Here is example usage of the two methods.
? table.external_index_def_enum("customer", "a,e,n,p,o,f,x,u,d,i,t" + crlf()) = ,,Company,c:\program files\a5v6\samples\alphasports\Customer.CDX, COMPANY,,,,,,Index ,,Customer_Id_Unique,c:\program files\a5v6\samples\alphasports\Customer.CDX, CUSTOMER_ID,,U,T,,,Index ,,Customer_Id,c:\program files\a5v6\samples\alphasports\Customer.CDX, CUSTOMER_ID,,,,,,Index ,,Lastname,c:\program files\a5v6\samples\alphasports\Customer.CDX, LASTNAME+FIRSTNAME,,,,,,Index ,,Lastname1,c:\program files\a5v6\samples\alphasports\Customer.CDX, LASTNAME,,,,,,Index ? table.external_index_def_from_name_get("customer", "company", "a,e,n,p,o,f,x,u,d,i,t") = ",,Company,c:\program files\a5v6\samples\alphasports\Customer.CDX,COMPANY,,,,,,Index"
See Also