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. Database & SysAdmin
  3. Database
  4. Microsoft OLE DB access to Oracle Database

Microsoft OLE DB access to Oracle Database

Scheduled Pinned Locked Moved Database
databaseoraclewpfcomtutorial
3 Posts 2 Posters 27 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.
  • C Offline
    C Offline
    Chris Meech
    wrote on last edited by
    #1

    I have installed MDAC 2.5 on a development machine and am trying to use the OLE DB consumer templates to access an Oracle database. Oddly it seems that I also have to have installed the Oracle client in order to get this to work. Does anyone have an example of how open a datasource using the microsoft OLE DB provider. I'm using the following, but it will only work if the Oracle client is installed also HRESULT hr; CDataSource db; CDBPropSet dbinit(DBPROPSET_DBINIT); // dbinit.AddProperty(DBPROP_AUTH_PASSWORD, OLESTR("PASSWORD")); // dbinit.AddProperty(DBPROP_AUTH_USERID, OLESTR("USERID")); dbinit.AddProperty(DBPROP_INIT_DATASOURCE, OLESTR("DB_NAME")); // dbinit.AddProperty(DBPROP_INIT_LCID, (long)1033); dbinit.AddProperty(DBPROP_INIT_PROMPT, (short)DBPROMPT_COMPLETE); // dbinit.AddProperty(DBPROP_INIT_PROVIDERSTRING, OLESTR("")); // hr = db.Open(_T("OraOLEDB.Oracle.1"), &dbinit); hr = db.Open(_T("MSDAORA.1"), &dbinit); Any comments are welcome. Thanks. Chris

    T 1 Reply Last reply
    0
    • C Chris Meech

      I have installed MDAC 2.5 on a development machine and am trying to use the OLE DB consumer templates to access an Oracle database. Oddly it seems that I also have to have installed the Oracle client in order to get this to work. Does anyone have an example of how open a datasource using the microsoft OLE DB provider. I'm using the following, but it will only work if the Oracle client is installed also HRESULT hr; CDataSource db; CDBPropSet dbinit(DBPROPSET_DBINIT); // dbinit.AddProperty(DBPROP_AUTH_PASSWORD, OLESTR("PASSWORD")); // dbinit.AddProperty(DBPROP_AUTH_USERID, OLESTR("USERID")); dbinit.AddProperty(DBPROP_INIT_DATASOURCE, OLESTR("DB_NAME")); // dbinit.AddProperty(DBPROP_INIT_LCID, (long)1033); dbinit.AddProperty(DBPROP_INIT_PROMPT, (short)DBPROMPT_COMPLETE); // dbinit.AddProperty(DBPROP_INIT_PROVIDERSTRING, OLESTR("")); // hr = db.Open(_T("OraOLEDB.Oracle.1"), &dbinit); hr = db.Open(_T("MSDAORA.1"), &dbinit); Any comments are welcome. Thanks. Chris

      T Offline
      T Offline
      Tomasz Sowinski
      wrote on last edited by
      #2

      Sorry - MS OLEDB provider for Oracle requires Oracle client. From MDAC 2.5 documentation: "The Microsoft OLE DB Provider for Oracle requires a system running: Oracle client software (appropriately installed and configured) version 7.3.3.4.0 or later, or for Oracle8, version 8.0.4.1.1c" Tomasz Sowinski -- http://www.shooltz.com.pl

      C 1 Reply Last reply
      0
      • T Tomasz Sowinski

        Sorry - MS OLEDB provider for Oracle requires Oracle client. From MDAC 2.5 documentation: "The Microsoft OLE DB Provider for Oracle requires a system running: Oracle client software (appropriately installed and configured) version 7.3.3.4.0 or later, or for Oracle8, version 8.0.4.1.1c" Tomasz Sowinski -- http://www.shooltz.com.pl

        C Offline
        C Offline
        Chris Meech
        wrote on last edited by
        #3

        Thanks, Tomasz. I happened to miss that little gem. And it certainly helps answer a lot of questions. :) Chris

        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