Creating a Rowset with IOpenRowset


System_CAPS_ICON_warning.jpg Warning

SQL Server Native Client (SNAC) is not supported beyond SQL Server 2012. Avoid using SNAC in new development work, and plan to modify applications that currently use it. The Microsoft ODBC Driver for SQL Server provides native connectivity from Windows to Microsoft SQL Server and Microsoft Azure SQL Database.

The SQL Server Native Client OLE DB provider supports the IOpenRowset::OpenRowset method with the following restrictions:

  • A base table or view must be specified in a database ID (DBID) structure that the pTableID parameter points to.

  • The DBID eKind member must indicate DBKIND_NAME.

  • The DBID uName member must specify the name of an existing base table or a view as a Unicode character string.

  • The pIndexID parameter of OpenRowset must be NULL.

The result set of IOpenRowset::OpenRowset contains a single rowset. Result sets that contain a single rowset can be supported by Microsoft SQL Server cursors. Cursor support allows the developer to use SQL Server concurrency mechanisms.


Community Additions