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!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Exception in pRecordSet

nakelnakel Posts: 127Member
_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"(""),
do u think the adModeUnknown could cause it to throw exception.

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