ADODB Rowset vs Stream Arbitration [modified]
-
SCENARIO: From a C++ ATL program I'm submitting database queries to an MSSQL 2000 system in the following formats: Select * from dbo.table (returns a rowset) Select * from dbo.table for xml auto (returns an XML stream) Exec dbo.sproc ... (could return a rowset or an XML stream) I can't tell before I execute the query whether it will return a rowset or an XML stream, however, after the query is executed I can determine which type of output was returned by checking the rowset's number of columns and first column name. PROBLEM: I now have the output in a rowset. This is fine if the output is a rowset, but, if its an XML stream I have a problem. How can I get the output from the rowset into a stream object AND have it properly translate the XML to a readable format? -- modified at 11:17 Friday 24th August, 2007
The art of conversation is not only saying the right thing at the right time, but to leave unsaid the wrong thing at a most tempting moment!