After hr = pConn.CreateInstance(__uuidof(Connection)); the value of hr is -2147221008. I can't seem to get anything more from the _com_error object that is thrown except that the errormessage says "Invalid Pointer". I wonder if there could be something wrong with my compile options? :confused:
Stu
Posts
-
ADO Connection -
ADO ConnectionMichael, I tried the casting and also added the adConnectUnspecified argument. My error occurs at runtime on the Open(...). Thanks, Glen
-
ADO ConnectionThe catch block shouldn't be executing in the first place. For some reason my connection pointer isn't valid after hr = pConn.CreateInstance(__uuidof(Connection)); is executed. Any ideas what I'm missing? I think I'm missing a header file or something. It comiles just fine though....????
-
ADO ConnectionHello, I am trying to establish a connection and I think I am missing something very basic. I get an "Invalid Pointer" error when the Open() is called. I am importing msado15.dll in StdAfx.h which is included in the file that contains the code below. My code: _ConnectionPtr pConn; HRESULT hr; try{ hr = pConn.CreateInstance(__uuidof(Connection)); _bstr_t bstrDSN = "DSN=test_db;UID=gstewart;PWD=gstewart"; pConn->Open(bstrDSN,"","", -1); } catch (_com_error e){ MessageBox(e.ErrorMessage()); }
-
how do yo uhandle files being dropped on controlsDid you notice "Search" on the home page? :) You need to subclass the control and handle WM_DROPFILES. See http://www.codeproject.com/listctrl/filedroplistctrl.asp for how...