Link to home
Start Free TrialLog in
Avatar of Paulconsulting
Paulconsulting

asked on

Oracle Connection String: Error: Driver's SQLAllocHandle on SQL_HANDLE_ENV failed

I am getting the following error:
ERROR [IM004] [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed

when trying to connect to an oracle database oracle 9i

I have tried the following connection strings
from web config
<add name="connString"  connectionString="Driver={Microsoft ODBC Driver for Oracle}; Server=(DESCRIPTION =(ADDRESS_LIST =(ADDRESS =(PROTOCOL = TCP)(HOST = hostval)(PORT = portval)))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = servicename)));uid=uidval; pwd=pwdval;"></add>

in dal class
Me.objConn = New OdbcConnection()
Me.objConn.ConnectionString = "Dsn=dsnname;" & _
                                              "Uid=uidtext;" & _
                                              "Pwd=pwdtext;"

The connection strings work fine when I debug on local machine, but fail when the application is on the server.

Any ideas?

Avatar of ajexpert
ajexpert
Flag of United States of America image

So are you using DSN or connection string?
Seems you are using DSN which you might have to create it on server.

BTW ODBC driver is very slow.  Why dont you switch to Oracle Driver for .NET?
ASKER CERTIFIED SOLUTION
Avatar of Dauhee
Dauhee
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
did you have any luck?