version 1.5
OC GET PRIMARY KEY LIST (cursor_ID; table; tableCat_Array; tableSchem_Array; tableName_Array; col_Array; sequence_Array; keyName_Array)
| Parameter | Type | Description | |
| cursor_ID | Longint | Cursor ID | |
| table | String | Name of table | |
| tableCat_Array | String Array | List of catalogs | |
| tableSchem_Array | String Array | List of schemas | |
| tableName_Array | String Array | List of tables | |
| col_Array | String Array | List of columns on which the index is based | |
| sequence_Array | String Array | Sequence order of the index | |
| keyName_Array | String Array | Name of the index |
Description
The OC GET PRIMARY KEY LIST command enables you to obtain a list of primary keys for a table on the ODBC data source.
cursor_ID must be the ID of a previously created and inactive cursor.
table is the name of the table whose column information you wish to obtain. You can browse all the distant tables by passing an empty string.
tableCat_Array is the name of the catalog on which the table is based.
tableSchem_Array is the name of the schemas on which the table is based.
If you passed an empty string in the table parameter, tableName_Array will contain the name of the distant tables.
col_Array is the name of a string array that will accept the values of the list of columns on which the index is based.
sequence_Array is the sequence order of the index.
keyName_Array is the name of the index.
Example
The following method loads the lists of primary keys and their descriptions into arrays:
ARRAY STRING(30;arCat0) ARRAY STRING(30;arSch;0) ARRAY STRING(30;arNam;0) ARRAY STRING(30;arCol;0) ARRAY STRING(30;arSeq;0) ARRAY STRING(30;arKey;0) OC GET PRIMARY KEY LIST(cur_id;table;"arCat";"arSch";"arNam";"arCol";"arSeq";"arKey")
See Also