Powered by Zoomin Software. For more details please contactZoomin

DataDirect OpenAccess SDK Help

Foreign keys catalog table OA_FKEYS

  • Last Updated: May 12, 2026
  • 2 minute read
    • OpenAccess SDK
    • Version 8.1
    • Documentation

The OA_FKEYS table contains information about foreign keys referenced by each table and the primary keys in each table. Each row identifies one primary key in a table and an associated foreign key or primary key. At this time the OpenAccess SDK SQL engine requires only the columns marked with an asterisk to be filled in. The foreign keys information is exposed through the SQLForeignKeys ODBC call. A row is considered a primary key definition if the FKTABLE_NAME column is NULL. The primary keys information is exposed through the SQLPrimaryKeys ODBC call.

Definition of foreign keys catalog table OA_FKEYS

Column Name Type Len Description
PKTABLE_QUALIFIER* WVARCHAR 128 The name of the database in which the table falls. It can be used to distribute tables into physically different databases. SCHEMA is normally used.
PKTABLE_OWNER* WVARCHAR 128 The owner of the table. It is normally set to SYSTEM or OAUSER.
SYSTEM—the table is managed by the OpenAccess SDK SQL engine.
OAUSER—the table is managed by the IP.
In future releases, this entry will be used to control access rights to the table and will represent the actual user who owns the table. The entry here and in the OA_COLUMNS must match.
PKTABLE_NAME* WVARCHAR 128 The name of the table for which the primary key is being defined.
PKCOLUMN_NAME* WVARCHAR 128 The name of the primary column.
FKTABLE_QUALIFIER* WVARCHAR 128 The name of the database in which the table exists. It can be used to distribute tables into physically different databases. SCHEMA is normally used.
FKTABLE_OWNER* WVARCHAR 128 The owner of the table. It is normally set to system or user.
SYSTEM—the table is managed by the OpenAccess SDK SQL engine.
OAUSER—the table is managed by the IP.
In future releases, this entry will be used to control access rights to the table and will represent the actual user who owns the table. The entry here and in the OA_COLUMNS must match.
FKTABLE_NAME* WVARCHAR 128 The name of the table to which the primary key is pointing. Null if this row indicates a primary key.
FKCOLUMN_NAME* WVARCHAR 128 The name of the foreign column to which the primary key is pointing.
KEY_SEQ SMALLINT   The column sequence number in key (starting with 1). Set to 1.
UPDATE_RULE SMALLINT   Set to null.
DELETE_RULE SMALLINT   Set to null.
FK_NAME WVARCHAR 128 The foreign key identifier. Set to null.
PK_NAME WVARCHAR 128 The primary key identifier. Set to null.
TitleResults for “How to create a CRG?”Also Available inAlert