Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Oracle & ASP, connection problem

Oracle & ASP, connection problem

From: <caiusmeridius_at_go2.pl>
Date: 12 Jul 2006 00:18:38 -0700
Message-ID: <1152688718.715228.89460@p79g2000cwp.googlegroups.com>


Hi!

I've a problem I cannot solve. I'm trying to connect to Oracle using ASP, when I try to open connection I get "ORA-12640: Authentication adapter initialization failed". I tried to change connection strings, OleDB drivers, ODBC drivers, nothing works. Interesting thing is when I use ASP.NET everything works fine (unfortunately I can't write the whole application in .NET).
Oracle server version is 8.1.7.0, OS WinXP, P4 processor.

This is the code with the error.

<%@ Language="VBScript" %>
<% Option Explicit %>

<%

        const CONNECTION_STRING = "Provider=msdaora;Data Source=mydatabase;User
Id=xxx;Password=xxx;"

        const adModeReadWrite = 3
        const adModeRead = 1
        dim objConn
        dim objRecordSet

%>

<%
Function getConnection(ConnectModeEnum)

        Dim OConnection

        Set Oconnection = Server.CreateObject ("ADODB.Connection")
        Oconnection.Mode = ConnectModeEnum

        Set getConnection = OConnection

End Function

Sub OpenConnection(Oconnection)

        Oconnection.Open CONNECTION_STRING <== here I get ORA-12640 End Sub
%>

</HTML>

        <BODY>
              <%
                        Response.Write(CONNECTION_STRING)
                        Set objConn = getConnection(adModeRead)
                        OpenConnection objConn
                %>
        </BODY>

</HTML>

This ASP.NET code works fine.
<%
const CONNECTION_STRING = "Provider=msdaora;Data Source=mydatabase;User Id=xxx;Password=xxx;"

dim conn As New OleDBConnection()
conn.ConnectionString = CONNECTION_STRING conn.Open()
  if (conn.State = System.Data.ConnectionState.Open) then

        Response.Write("I'm connected.")   else

        Response.Write("I can't connect.")   end if
%>

Anybody have any idea?

Greetings
Rafal Received on Wed Jul 12 2006 - 02:18:38 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US