scarleton
March 14th, 2003, 04:03 PM
I am working in VC6 SP6 and connection to MS SQL 2000 via OLE DB and ATL Consumer Templates. One of the stored procedures takes a parameter that is defined ‘AS TEXT’. The parameter is to be XML and can be over 500K. I figured that I should treat it as a BLOB. Considering the xml was created in IXMLDOMDocument, figured that I could simply pass down either the IStream or IPersistStream, but both have failed:
struct CTheAccessor
{
IPersistStream* m_iXmlString;
BEGIN_PARAM_MAP(CTheAccessor)
BLOB_ENTRY( 1, IID_IPersistStream, STGM_READ, m_iXmlString)
END_PARAM_MAP()
}
CCommand< CAccessor< CTheAccessor > > insert;
XmlDocument->QueryInterface(IID_IPersistStream, &insert. m_iXmlString);
hr = Insert.Open( session );
With both IStream and IPersistStream, the hr is 0x80004005. How do I make this work? Is the Accessor setup correctly? Or does the stored proc need to change?
Sam
struct CTheAccessor
{
IPersistStream* m_iXmlString;
BEGIN_PARAM_MAP(CTheAccessor)
BLOB_ENTRY( 1, IID_IPersistStream, STGM_READ, m_iXmlString)
END_PARAM_MAP()
}
CCommand< CAccessor< CTheAccessor > > insert;
XmlDocument->QueryInterface(IID_IPersistStream, &insert. m_iXmlString);
hr = Insert.Open( session );
With both IStream and IPersistStream, the hr is 0x80004005. How do I make this work? Is the Accessor setup correctly? Or does the stored proc need to change?
Sam