Using IRow::GetColumns

OLE DB and SQL Server

OLE DB and SQL Server

Using IRow::GetColumns

IRow implementation allows forward only sequential access to the columns. You can either access all the columns in the row with a single call to IRow::GetColumns, or call IRow::GetColumns multiple times each time accessing few columns in the row.

The multiple calls to IRow::GetColumns should not overlap. For example, if the first call to IRow::GetColumns retrieves columns 1, 2, and 3, the second call to IRow::GetColumns should call for columns 4, 5, and 6. If subsequent calls to IRow::GetColumns overlap, the status flag (dwstatus field in DBCOLUMNACCESS) will be set to DBSTATUS_E_UNAVAILABLE.

To fetch columns using IRow::GetColumns