SQLForeignKeys (level two only)

SQLForeignKeys can return a list of foreign keys.

SQLForeignKeys can return either of the following items:
  • A list of foreign keys in the specified table (columns in the specified table that refer to primary keys in other tables)
  • A list of foreign keys in other tables that refer to the primary key in the specified table

The driver returns each list as a result set on the specified hstmt.

The following table describes the SQLSTATE and error values for SQLForeignKeys.
SQLSTATE Error value Error message
01000 -11001 General warning
08S01 -11020 Communication link failure
24000 -11031 Invalid cursor state
IM001 -11040 Driver does not support this function
S1000 -11060 General error
S1001 -11061 Memory allocation failure
S1008 -11065 Operation canceled
S1009 -11066 Invalid argument value
S1010 -11067 Function sequence error
S1090 -11071 Invalid string or buffer length
S1C00 -11092 Driver not capable
S1T00 -11094 Timeout expired
S1C00 -11300 SQL_DEFAULT_PARAM not supported
08S01 -11301 A protocol error has been detected. Current® connection is closed.
S1000 -11310 Create and Drop must be executed within a ServerOnly Connection
S1000 -11320 Syntax error
S1000 -11323 The statement contained an escape clause not supported by this database driver