ATL OLE DB Consumer Code problem
- From: Olivier MATROT <olivier.matrot@xxxxxxxxxxxxx>
- Date: Wed, 12 Dec 2007 05:24:01 -0800
I'm using ATL OLE DB Consumer code, specifically a CCommand<TAccessor,
TRowset,TMulitple> based class. The accessor is of type CAccessor, the rowset
is of type CRowset and there is a single rowset returned by the query. The
query used is either a simple SQL SELECT Statement or a stored procedure call.
The same behavior is observed with either SQL Server OLE DB Provider or SQL
Native Client provider.
Sometimes, after creating the command on the session and excuting it
(CCommand::Open(...)), the return value is E_FAIL and there is no error
associated.
After digging in the code, it appears that ICommand::Execute returns S_OK
but there is no rowset interface returned (GetInterface() == NULL). MSDN
documentation is not talking about this behavior. You could see the code in
the function CCommand<>::ExecuteAndBind(...) in atldbcli.h. Bind() is called
and returns E_FAIL.
Any help appreciated.
.
- Follow-Ups:
- Re: ATL OLE DB Consumer Code problem
- From: rubble
- Re: ATL OLE DB Consumer Code problem
- Prev by Date: Re: SQL 2005 linked server to Access 97
- Next by Date: Re: SQL 2005 linked server to Access 97
- Previous by thread: Re: SQL 2005 linked server to Access 97
- Next by thread: Re: ATL OLE DB Consumer Code problem
- Index(es):
Relevant Pages
|