function
|
SQLForeignKeys
|
|
Library: omodbc - low-level ODBC support
Include: omodbc.xin
|
Return type: Integer
Returns: An SQL return code. The following values may be returned:
- SQL_SUCCESS (the list of foreign was retrieved).
- SQL_SUCCESS_WITH_INFO (the list of foreign was retrieved, but a message was issued).
- SQL_ERROR (an error occurred).
- SQL_INVALID_HANDLE (the handle is invalid).
- SQL_STILL_EXECUTING (the program is still executing).
|
Declaration define external integer function sqlforeignkeys
( read-only sql_handle_type StatementHandle,
value stream PKCatalogName,
value integer NameLength1,
value stream PKSchemaName,
value integer NameLength2,
value stream PKTableName,
value integer NameLength3,
value stream FKCatalogName,
value integer NameLength4,
value stream FKSchemaName,
value integer NameLength5,
value stream FKTableName,
value integer NameLength6 )
Purpose
Returns either a list of foreign keys in the specified table (columns that refer to primary keys in other tables) or a list of foreign keys in other tables that refer to the primary key in the specified table. Each list is returned as a result set on the specified statement.
Input arguments:
- StatementHandle.
- PKCatalogName. The primary key table catalog name. If a driver supports catalogs for some tables but not others, such as when the driver retrieves data from different DBMSs, an empty string ("") denotes tables without catalogs. PKCatalogName cannot contain a string search pattern.
- NameLength1. The length of PKCatalogName.
- PKSchemaName. The primary key table schema name. If a driver supports schemas for some tables but not others, such as when the driver retrieves data from different DBMSs, an empty string ("") denotes tables without schemas. PKSchemaName cannot contain a string search pattern.
- NameLength2. The length of PKSchemaName.
- PKTableName. The primary key table name. PKTableName cannot contain a string search pattern.
- NameLength3. The length of PKTableName.
- FKCatalogName. The foreign key table catalog name. If a driver supports catalogs for some tables but not others, such as when the driver retrieves data from different DBMSs, an empty string ("") denotes tables without catalogs. FKCatalogName cannot contain a string search pattern.
- NameLength4. The length of FKCatalogName.
- FKSchemaName. The foreign key table schema name. If a driver supports schemas for some tables but not others, such as when the driver retrieves data from different DBMSs, an empty string ("") denotes tables without schemas. FKSchemaName cannot contain a string search pattern.
- NameLength5. The length of FKSchemaName.
- FKTableName. The primary key table name. PKtableName cannot contain a string search pattern.
- NameLength6. The length of FKTableName.
Generated: August 11, 2000 at 3:07:54 pm
If you have any comments about this section of the documentation, send email to docerrors@omnimark.com
Copyright © OmniMark Technologies Corporation, 1988-2000.