|
COStream Class Overview class COStream : virtual public CRtnInfo COStream simply wraps the functions of interfaces ISequentialStream and IGetSourceRow. Although it doesn't have a function to open a COStream object, a COStream object can be opened with one of three global template functions, BindObject<T>, CreateObject<T>, and Open<T>. Additionally, COStream has a function to retrieve a source row object which creates this stream object. For how to use it, see the example oledb25. Specifically, Microsoft OLE DB provider for SQL Sever 2000 supports a new dialect called DBGUID_MSSQLXML to execute XML templates with embedded queries. The following codes demonstrates how to open streams with XML queries with or without a parameter. LPOLESTR strXMLQuery=L"<ROOT xmlns:sql='urn:schemas-microsoft-com:xml-sql'> <sql:query>SELECT PRODUCTID, PRODUCTNAME FROM PRODUCTS WHERE PRODUCTNAME LIKE 'C%' FOR XML AUTO </sql:query> </ROOT>"; CBulkRecord<COStream>
XMLStream; //error
checks ignored //set a
CPInfoEx structure |