1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

ODBC DSN to connect Oracle

Discussion in 'Oracle' started by prashantSum, Jul 28, 2006.

  1. prashantSum

    prashantSum New Member

    Joined:
    Oct 24, 2005
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    0
    Hi ,

    I use ODBC DSN to connect Oracle.

    string ConnString ="DSN=OracleTest;UID=webstore;PWD=webstore";
    OdbcConnection connection = new OdbcConnection(newConnString);
    connection.Open();

    when I setup the DSN in windows ODBC Datasource manager, the test
    connection was successful, but when use in asp.net code,

    I got the following errors:

    "ERROR [IM003] Specified driver could not be loaded due to system error 5 (Oracle in OraClient10g_home4)."

    Does anyone have some idea about this error?
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,287
    Likes Received:
    364
    Trophy Points:
    83
    You are passing newConnString as the parameter where as it should be ConnString
     
  3. prashantSum

    prashantSum New Member

    Joined:
    Oct 24, 2005
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    0
    sorry that's actually only a spelling mistake,

    the proper code is given below,

    string ConnString ="DSN=OracleTest;UID=webstore;PWD=webstore";
    OdbcConnection connection = new OdbcConnection(ConnString);
    connection.Open();

    so still I am getting the same error

    "ERROR [IM003] Specified driver could not be loaded due to system error 5 (Oracle in OraClient10g_home4)."
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,287
    Likes Received:
    364
    Trophy Points:
    83
    By default, anonymous access to ASP applications uses the local IUSR_COMPUTERNAME account and ASP.NET applications use the local ASPNET account.

    Try adding IUSR_COMPUTERNAME account or the ASPNET account to the Runtime Users group and restart the IIS Service
     

Share This Page