Home » Infrastructure » Windows » Oracle PL/SQL and ASP Programs
Oracle PL/SQL and ASP Programs [message #365794] Thu, 03 February 2000 19:20 Go to next message
Rajeeva
Messages: 20
Registered: October 1998
Junior Member
I am trying to use a Oracle stored procedure in a ASP (Active Server Page) program. Can some one tell me how to pass in a value using the ASP program and receive the result from the PL/SQL stored proc.

e.g. send in the deptno and get the dname from the dept table.

Thanks in advance

Rajeeva
Re: Oracle PL/SQL and ASP Programs [message #365825 is a reply to message #365794] Wed, 09 February 2000 20:29 Go to previous messageGo to next message
Diego Amenta
Messages: 1
Registered: February 2000
Junior Member
I'm looking to do the same thing, and I can't. Any help would be appreciated.
Re: Oracle PL/SQL and ASP Programs [message #365854 is a reply to message #365794] Tue, 22 February 2000 18:21 Go to previous messageGo to next message
Jeff
Messages: 63
Registered: July 1999
Member
You need to use "ADODB.Command" to do this. Look it up in the ASP documentation or on the MSDN website... It's pretty straightforward though.
Re: Oracle PL/SQL and ASP Programs [message #365855 is a reply to message #365794] Tue, 22 February 2000 18:22 Go to previous messageGo to next message
Jeff
Messages: 63
Registered: July 1999
Member
You need to use "ADODB.Command" to do this. Look it up in the ASP documentation or on the MSDN website... It's pretty straightforward though.
Re: Oracle PL/SQL and ASP Programs [message #365856 is a reply to message #365794] Tue, 22 February 2000 18:22 Go to previous messageGo to next message
Jeff
Messages: 63
Registered: July 1999
Member
You need to use "ADODB.Command" to do this. Look it up in the ASP documentation or on the MSDN website... It's pretty straightforward though.
Re: Oracle PL/SQL and ASP Programs [message #365971 is a reply to message #365794] Thu, 17 August 2000 08:22 Go to previous messageGo to next message
Sathish Babu Saravanan
Messages: 2
Registered: August 2000
Junior Member
Try the following script to execute the stored
procedure

Set OraConn=Server.CreateObject("ADODB.Connection")
OraConn.Open "DSN=Scott;UID=Tiger;PWD=Oracle;"

Set cmdLine= Server.CreateObject("ADODB.Command")
Set cmdLine.ActiveConnection = OraConn
cmdLine.CommandType = adCmdStoredProc
cmdLine.CommandText = "sp_GetDeptName"

Set ParOne=cmdLine.CreateParameter("DeptName",adVarChar,adParamInput,19)
cmdLine.Parameters.Append ParOne

Set ParTwo=cmdLine.CreateParameter("DeptNo",adInteger,adParamOutput,5)
cmdLine.Parameters.Append ParTwo

cmdLine("DeptNo") = CInt("1")

cmdLine.Execute
Re: Oracle PL/SQL and ASP Programs [message #365972 is a reply to message #365794] Thu, 17 August 2000 08:31 Go to previous message
Sathish Babu Saravanan
Messages: 2
Registered: August 2000
Junior Member
I made a mistake in the previous reply. I apologise for the same.

sp_GetDeptName is the Stored Procedure.

Try the following script to execute the stored
procedure

Set OraConn=Server.CreateObject("ADODB.Connection")
OraConn.Open "DSN=Oracle;UID=Scott;PWD=Tiger;"

Set cmdLine= Server.CreateObject("ADODB.Command")
Set cmdLine.ActiveConnection = OraConn
cmdLine.CommandType = adCmdStoredProc
cmdLine.CommandText = "sp_GetDeptName"

Set ParOne=cmdLine.CreateParameter("DeptName",adVarChar,adParamOutput,19)
cmdLine.Parameters.Append ParOne

Set ParTwo=cmdLine.CreateParameter("DeptNo",adInteger,adParamInput,5)
cmdLine.Parameters.Append ParTwo

cmdLine("DeptNo") = CInt("1")

cmdLine.Execute
Previous Topic: 3709 err connecting with VB
Next Topic: Location of Oracle V8 OLE driver
Goto Forum:
  


Current Time: Wed Apr 17 19:24:37 CDT 2024