Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Problems with ADO Connection to ORacle using VC

Problems with ADO Connection to ORacle using VC

Scheduled Pinned Locked Moved C / C++ / MFC
c++databaseoraclesysadminhelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RK_2000
    wrote on last edited by
    #1

    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; } ......

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups