Hi All
I am currently experiencing problems connecting to an oracle database using the below in an asp page :
<%@Language="vbscript"%>
<%Option Explicit%>
<%
Dim OraSession
Dim OraDatabase
Dim OraDynaset
Set OraSession = Server.CreateObject("OracleInProcServer.XOraSession")
Set OraDatabase = OraSession.DbOpenDatabase("databasealias", "username/password", cint(0))
Set OraDynaset = OraDatabase.DbCreateDynaset("SELECT CaseNo FROM DCAPR", cint(0))
If Not OraDynaset.Bof Then
OraDynaset.MoveFirst
Do While Not OraDynaset.EOF
Response.write OraDynaset.Fields("CaseNo") & "<br>"
OraDynaset.MoveNext
Loop
End If
%>
I recieve the following error when attempting to run this script :
Error Type:
Oracle Automation (0x800A01B8)
Unable to make connection, ORA-12638: Credential retrieval failed
However when I run the below this script first (and i found this out totally by fluke) the script will execute and retrieve data from my oracle data ??????
<%@Language="vbscript"%>
<%
'Constants
adCmdUnknown = 0
adCmdText = 1
adCmdTable = 2
adCmdText = 1
adParamInput = 1
adParamOutput = 2
adInteger = 3
adUseClient = 3
adOpenStatic = 3
Dim cnnOracle, cmdStoredProc, rsEmp, objProp, objRS, objCommand
Set cnnOracle = Server.CreateObject ("ADODB.Connection")
cnnOracle.CursorLocation = adUseClient
'OLE DB connection
'strConn = "Provider=OLEDB.oracle; Data Source=acollive; User ID=acolaid; Password=nosredna"
strConn = "Provider=MSDAORA.1; Data Source=acollive; User ID=acolaid; Password=nosredna"
cnnOracle.Open strConn
Set objCommand = Server.CreateObject("ADODB.Command")
objCommand.ActiveConnection = cnnOracle
objCommand.CommandText = "DCAPR"
objCommand.CommandType = adCmdTable
Set objRS = objCommand.Execute
%>
Can anyone tell me whats going wrong here an how to resolve this problem ? I wish to use the 0040 approach as the second script doesnt recognise the data type.
Many thanks
Colin
I am currently experiencing problems connecting to an oracle database using the below in an asp page :
<%@Language="vbscript"%>
<%Option Explicit%>
<%
Dim OraSession
Dim OraDatabase
Dim OraDynaset
Set OraSession = Server.CreateObject("OracleInProcServer.XOraSession")
Set OraDatabase = OraSession.DbOpenDatabase("databasealias", "username/password", cint(0))
Set OraDynaset = OraDatabase.DbCreateDynaset("SELECT CaseNo FROM DCAPR", cint(0))
If Not OraDynaset.Bof Then
OraDynaset.MoveFirst
Do While Not OraDynaset.EOF
Response.write OraDynaset.Fields("CaseNo") & "<br>"
OraDynaset.MoveNext
Loop
End If
%>
I recieve the following error when attempting to run this script :
Error Type:
Oracle Automation (0x800A01B8)
Unable to make connection, ORA-12638: Credential retrieval failed
However when I run the below this script first (and i found this out totally by fluke) the script will execute and retrieve data from my oracle data ??????
<%@Language="vbscript"%>
<%
'Constants
adCmdUnknown = 0
adCmdText = 1
adCmdTable = 2
adCmdText = 1
adParamInput = 1
adParamOutput = 2
adInteger = 3
adUseClient = 3
adOpenStatic = 3
Dim cnnOracle, cmdStoredProc, rsEmp, objProp, objRS, objCommand
Set cnnOracle = Server.CreateObject ("ADODB.Connection")
cnnOracle.CursorLocation = adUseClient
'OLE DB connection
'strConn = "Provider=OLEDB.oracle; Data Source=acollive; User ID=acolaid; Password=nosredna"
strConn = "Provider=MSDAORA.1; Data Source=acollive; User ID=acolaid; Password=nosredna"
cnnOracle.Open strConn
Set objCommand = Server.CreateObject("ADODB.Command")
objCommand.ActiveConnection = cnnOracle
objCommand.CommandText = "DCAPR"
objCommand.CommandType = adCmdTable
Set objRS = objCommand.Execute
%>
Can anyone tell me whats going wrong here an how to resolve this problem ? I wish to use the 0040 approach as the second script doesnt recognise the data type.
Many thanks
Colin