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. Connecting to Oracle DB through webservice

Connecting to Oracle DB through webservice

Scheduled Pinned Locked Moved Database
csharpdatabasehelpasp-netoracle
6 Posts 3 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.
  • M Offline
    M Offline
    mew_lobo
    wrote on last edited by
    #1

    Hi, I'm beginner to .NET... I'm trying to access an Oracle Database using a ASP.Net webservice with C#.... I'm using VS.NET 2005 and Oracele 10g... Created an System DSN using the Oracle ODBC driver I tried using an OdbcConnection String constr = String.Format("DSN={0};UID={1};PWD={2};", "TEST", "user", "passwd"); con = new OdbcConnection(constr); con.open(); This code works fine with a C# client program, but when I tried it with the webservice I get the following error... Error[IM003] Specified driver could not be loaded due to sytem error 5(Oracle in OraClient10g_home1) ny ideas? Am I missing something...?? Plz help if possible... Mahesh

    F C 2 Replies Last reply
    0
    • M mew_lobo

      Hi, I'm beginner to .NET... I'm trying to access an Oracle Database using a ASP.Net webservice with C#.... I'm using VS.NET 2005 and Oracele 10g... Created an System DSN using the Oracle ODBC driver I tried using an OdbcConnection String constr = String.Format("DSN={0};UID={1};PWD={2};", "TEST", "user", "passwd"); con = new OdbcConnection(constr); con.open(); This code works fine with a C# client program, but when I tried it with the webservice I get the following error... Error[IM003] Specified driver could not be loaded due to sytem error 5(Oracle in OraClient10g_home1) ny ideas? Am I missing something...?? Plz help if possible... Mahesh

      F Offline
      F Offline
      Frank Kerrigan
      wrote on last edited by
      #2

      Are you importing the correct namespaces in your webservice You may also have to install an oracle client driver I've had issues with this in the past. Look where you want to go not where you don't want to crash. Bikers Bible

      M 1 Reply Last reply
      0
      • M mew_lobo

        Hi, I'm beginner to .NET... I'm trying to access an Oracle Database using a ASP.Net webservice with C#.... I'm using VS.NET 2005 and Oracele 10g... Created an System DSN using the Oracle ODBC driver I tried using an OdbcConnection String constr = String.Format("DSN={0};UID={1};PWD={2};", "TEST", "user", "passwd"); con = new OdbcConnection(constr); con.open(); This code works fine with a C# client program, but when I tried it with the webservice I get the following error... Error[IM003] Specified driver could not be loaded due to sytem error 5(Oracle in OraClient10g_home1) ny ideas? Am I missing something...?? Plz help if possible... Mahesh

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

        Try to determine what account the webservice runs under. If it is the default one called ASPNET it likely does not have the needed permissions for accessing the system DSN. That's what I'd look at first. Chris Meech I am Canadian. [heard in a local bar] When no one was looking, every single American woman between the ages of 18 and 32 went out and got a tatoo just above their rumpus. [link[^]]

        M 1 Reply Last reply
        0
        • F Frank Kerrigan

          Are you importing the correct namespaces in your webservice You may also have to install an oracle client driver I've had issues with this in the past. Look where you want to go not where you don't want to crash. Bikers Bible

          M Offline
          M Offline
          mew_lobo
          wrote on last edited by
          #4

          Hi, Yes, I'm using System.Data.Odbc and I hav the Oracle client for 10g rel 1 installed... The connection opens correctly when I use the code in a C# windows application... I only get the error when using it in the webservice....

          1 Reply Last reply
          0
          • C Chris Meech

            Try to determine what account the webservice runs under. If it is the default one called ASPNET it likely does not have the needed permissions for accessing the system DSN. That's what I'd look at first. Chris Meech I am Canadian. [heard in a local bar] When no one was looking, every single American woman between the ages of 18 and 32 went out and got a tatoo just above their rumpus. [link[^]]

            M Offline
            M Offline
            mew_lobo
            wrote on last edited by
            #5

            Hi Chris, Thx.... That was the issue :-D I gave the ASPNET user access to my oracle home folder and its subfolders and now the code works.... I had issues when I tried using the Oracle .NET provider... But this solution corrected everything.... Thx everybody....:) Mahesh

            C 1 Reply Last reply
            0
            • M mew_lobo

              Hi Chris, Thx.... That was the issue :-D I gave the ASPNET user access to my oracle home folder and its subfolders and now the code works.... I had issues when I tried using the Oracle .NET provider... But this solution corrected everything.... Thx everybody....:) Mahesh

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

              Glad that worked. I should have pointed you to my only article, cause I ran into the permissions thing with it as well. And it took a bit of time to figure out how to deal with the permissions. Chris Meech I am Canadian. [heard in a local bar] When no one was looking, every single American woman between the ages of 18 and 32 went out and got a tatoo just above their rumpus. [link[^]]

              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