Problems with ADO Connection to ORacle using VC
-
Hi there, I try to connect to Oracle using C++ and ADO with the following conection string...Upon trying to open, I get an access violation error. This is the connection string: "Driver={Microsoft ODBC for Oracle};Server=LST3.WORLD;Uid=MyUserName;Pwd=MyPassword;" The same set of stuff seem to connect me to the database through VB. Any ideas? HRESULT hRes; CLSID clsid; BOOL bRet = FALSE; LONG nOption = 1; CoInitialize(NULL); hRes = CLSIDFromProgID(L"ADODB.Connection", &clsid); if (SUCCEEDED(hRes)) { hRes = CoCreateInstance( clsid, 0, CLSCTX_INPROC_SERVER, __uuidof(_Connection), (void **)&m_pConnection ); } else { bRet = FALSE; } if(SUCCEEDED(hRes)) { SetDSN(nDatabase); try { hRes = m_pConnection->Open(m_varDSN.bstrVal,L"",L"", adConnectUnspecified); } catch (_com_error e) { bRet = FALSE; } ......