TechNet
Export (0) Print
Expand All

Fetching a Single Row with IRow

 

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 IRow interface implementation in the SQL Server Native Client OLE DB provider is simplified to increase performance. IRow allows direct access to columns of a single row object. If you know beforehand that the result of a command execution will produce exactly one row, IRow will retrieve the columns of that row. If the result set includes multiple rows, IRow will expose only the first row.

The IRow implementation does not allow any navigation of the row. Each column in the row is accessed only one time with one exception: A column can be accessed one time to find the column size and again to fetch the data.

System_CAPS_ICON_note.jpg Note


IRow::Open supports only DBGUID_STREAM and DBGUID_NULL type of objects to be opened.

To obtain a row object using ICommand::Execute method, IID_IRow must be passed. The IMultipleResults interface must be used to handle multiple result sets. IMultipleResults supports IRow and IRowset. IRowset is used for bulk operations.

Rowsets

Community Additions

ADD
Show:
© 2016 Microsoft