SQLLinkedCatalogs returns a list of catalogs available on a linked server.
SQLRETURN SQLLinkedCatalogs(
SQLHSTMT hstmt,
SQLTCHAR* ServerName,
SQLSMALLINT NameLength1)
SUCCEED or FAIL.
Microsoft® SQL Server™ linked servers are OLE DB data sources. Some OLE DB data sources expose catalogs. For those that do, SQLLinkedCatalogs returns the list of data source exposed catalogs.
SQLLinkedCatalogs returns a result set defined as follows.
Column name |
Column number | Data type |
Comments |
---|---|---|---|
CATALOG_NAME | 1 | SQLWCHAR | Name of the catalog. |
DESCRIPTION | 2 | SQLWCHAR | Human-readable description of the catalog. |