C++ OLEDB Consumer returning E_FAIL when calling stored procedure with no resultset
-
mercoledì 25 luglio 2012 10:59
We have a C++ OLEDB consumer which was recently upgraded from VS6 / ATL3.0 to VS2010 / ATL7.0
Within the same library, all data access calls are working as expected, except for this one. It calls a stored procedure using the CCommand<CAccessor<> templates and defines a parmaeter map and column map for the result set.
The stored procedure may or may not return the resultset and in the case where it is called and no resultset is returned, when calling theCCommand<CAccessor<CMyClass> >::Open(m_Session);
method, we get E_FAIL
I have traced the traffice using SQL Profiler which appears to be fine and executing as expected. I have also double checked that all parameter types and sizes match correctly
I suspect it is something to do with binding the column map as if I comment out the column map definition then the call works as expected, but in the case when the result set is returned the columns are not bound.
I can code around this by using the DynamicAccessor if required but curious as to why this worked pre v 7.0.
Any help much appreciated
Raymond

