<<

Contents

Search

>>

 

JDBC_INDEX_NAMES$

 

 

Function

 

 

Syntax:

JDBC_INDEX_NAMES$(<File Number>,<Table Name>)

 

<File Number>

= <NUM-EXPRESSION>

<Table Name>

= <STRING-EXPRESSION>

 

 

Meaning:

Returns the keys of a table in the following format:

 

<INDEXTYPE-1> | <INDEXNAME-1> | <COLUMN NAME-1> | <SORTING-1> |

<INDEXTYPE-2> | <INDEXNAME-2> | < COLUMN NAME -2> | < SORTING -2> |

 ..."

 

<INDEXTYPE-n>

= "0" if the Index is unique.

= "1" if the Index is ambiguous.

<INDEXNAME-n>

Name of the Index key

< COLUMN NAME E-n>

Name of an Index field

< SORTING -n>

= "A" if the Index field is sorted in ascending order.

= "D" if the Index field is sorted in descending order.

 

JDBC_INDEX_NAMES$ returns the empty string "" if an error occurred.

 

If an error occurs, the variable OK contains the error number and the function JDBC_GET_LAST_ERROR$ returns the error text.

 

Parameter:

File Number

Number of JDBC database

Table Name

Name of table

 

Sample:

INDEX$ = JDBC_INDEX_NAMES$(2,"ADDRESS")

IF OK <> 0

THEN ERRORMES = JDBC_GET_LAST_ERROR$ QUIT

ENDIF

 

The content of INDEX$ is, for example:

 

"0|Address0|Name1|A|0|Address0|Name2|A|1|Address1|Phone|D"

 

In this example the table "ADDRESS" has two Index keys, that are "Address0" and "Address1". The Index key "Address0" is unique and the Index key "Address1" is not unique.

 

The Index key "Address0" consists of the two file fields "Name1" and "Name2", which are sorted in ascending order respectively.

 

The Index key "Address1" only consists of the field "Phone", which is sorted in descending order.

 

See also:

JDBC_TABLE_NAMES$