Edit

Share via


CStreamRowset Class

Used in a CCommand or CTable declaration.

Syntax

template <class TAccessor = CAccessorBase>
class CStreamRowset

Parameters

TAccessor
An accessor class.

Requirements

Header: atldbcli.h

Members

Methods

Name Description
CStreamRowset Constructor. Instantiates and initializes the CStreamRowset object.
Close Releases the ISequentialStream interface pointer in the class.

Remarks

Use CStreamRowset in your CCommand or CTable declaration, for example:

CCommand< CAccessor<CCustomerAccessor>, CStreamRowset > myCmd;

or

CCommand< CNoAccessor, CStreamRowset > myCmd;

ICommand::Execute returns an ISequentialStream pointer, which is stored in m_spStream. You then use the Read method to retrieve the (Unicode string) data in XML format. For example:

BYTE pBuf[1024];
ULONG cbRead = 0;
myCmd.m_spStream->Read(pBuf, sizeof(pBuf), &cbRead);

SQL Server 2000 performs the XML formatting, and will return all columns and all rows of the rowset as one XML string.

Note

This feature works with SQL Server 2000 only.

CStreamRowset::CStreamRowset

Instantiates and initializes the CStreamRowset object.

Syntax

CStreamRowset();

CStreamRowset::Close

Releases the ISequentialStream interface pointer in the class.

Syntax

void Close();

See also

OLE DB Consumer Templates
OLE DB Consumer Templates Reference