Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Oracle (http://www.go4expert.com/forums/oracle-forum/)
-   -   ODBC DSN to connect Oracle (http://www.go4expert.com/forums/odbc-dsn-connect-oracle-t1085/)

prashantSum 28Jul2006 14:28

ODBC DSN to connect Oracle
 
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?

shabbir 28Jul2006 15:07

Re: ODBC DSN to connect Oracle
 
You are passing newConnString as the parameter where as it should be ConnString

prashantSum 28Jul2006 17:34

Re: ODBC DSN to connect Oracle
 
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)."

shabbir 28Jul2006 18:15

Re: ODBC DSN to connect Oracle
 
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


All times are GMT +5.5. The time now is 07:24.