Fully qualified rowset names

Some rowsets need to be identified in the EXTERNAL NAME clause through a fully qualified name.

A fully qualified name incorporates either or both of the following:
  • the associated catalog name, which requires the following information:
    • whether the provider supports catalog names
    • where to put the catalog name in the fully qualified name
    • which catalog name separator to use
  • the associated schema name, which requires the following information:
    • whether the provider supports schema names
    • which schema name separator to use
For information on the support offered by your OLE DB provider for catalog and schema names, refer to the documentation of the literal information of your OLE DB provider.

If DBLITERAL_CATALOG_NAME is not NULL in the literal information of your provider, use a catalog name and the value of DBLITERAL_CATALOG_SEPARATOR as a separator. To determine whether the catalog name goes at the beginning or the end of the fully qualified name, refer to the value of DBPROP_CATALOGLOCATION in the property set DBPROPSET_DATASOURCEINFO of your OLE DB provider.

If DBLITERAL_SCHEMA_NAME is not NULL in the literal information of your provider, use a schema name and the value of DBLITERAL_SCHEMA_SEPARATOR as a separator.

If the names contain special characters or match keywords, enclose the names in the quote characters specified for your OLE DB provider. The quote characters are defined in the literal information of your OLE DB provider as DBLITERAL_QUOTE_PREFIX and DBLITERAL_QUOTE_SUFFIX. For example, in the following EXTERNAL NAME the specified rowset includes catalog name pubs and schema name dbo for a rowset called authors, with the quote character " used to enclose the names.

   EXTERNAL NAME '!"pubs"."dbo"."authors"!Provider=SQLOLEDB.1;...';

For more information on constructing fully qualified names, refer to Microsoft OLE DB 2.0 Programmer's Reference and Data Access SDK, Microsoft Press, 1998, and the documentation for your OLE DB provider.