connect to Oracle DB in ASP.net application

I try to connect to Oracle database in my .net web application but i have the following error:

Driver's SQLAllocHandle on SQL_HANDLE_ENV failed

I use this source code:

Dim strConnectionString As String = "driver={Microsoft ODBC for Oracle};data source=TEST;UID=pippo;PWD=pluto"

Dim Conn As New OdbcConnection(strConnectionString)

The "Conn.Open()" method causes the error.

Many Thanks
Maurizio



Answer this question

connect to Oracle DB in ASP.net application

  • access2reality

    Yes... you should use the Oracle DataProvider when connecting to Oracle database...

  • Camden Bainwright

    I noticed you're using ODBC for this data access. May I ask why you're not using the System.Data.OracleClient provider instead (available in .Net 1.1 and later only) It's much faster and more robust than ODBC and you'll probably have less problems too.

  • skywave

    hi

    i hope changing to OracleClient will solve the problem. If u find the problem again.. check the security tab in the web server. the read/write permision should b given to user ASPNET

    bye



  • connect to Oracle DB in ASP.net application