Exception in pRecordSet - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Exception in pRecordSet

nakelnakel Posts: 127Member
pRecordSet->Open(bstrQuery,
_variant_t((IDispatch *)my_pDocAcad->m_pConnection,true), adOpenStatic,
adLockOptimistic, adCmdText);

This line is throwing an exception. What could be wrong with it?

where my_pDocAcad is a pointer to GetDocument of MyAppDoc class. m_pConnection is the connection pointer defined in the MyAppDoc class.
bstrQuery is the SQL command

The open() fxn has the connection string of a provider Jet 4.0 , and the long option is a adModeUnknown.
hr = m_pConnection->open(L"Provider='......;Data source=c:.....;'
(_bstr_t ) L"(""),
(_bstr_t ) L"(""),
adModeUnknown)
do u think the adModeUnknown could cause it to throw exception.

why is it throwing exception.
Sign In or Register to comment.