Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Oracle & ASP, connection problem
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
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>
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
![]() |
![]() |