Home » RDBMS Server » Server Administration » calling an oracle stored procedure from an asp page
calling an oracle stored procedure from an asp page [message #374626] Thu, 21 June 2001 16:10 Go to next message
van
Messages: 6
Registered: June 2001
Junior Member
calling a stored procedure from an ASP page through ADO. my background is in SQL, so pardon my oracle-ignorance. below is a sample of the asp we're attempting, I'm getting an error on the j.execute line, saying it's either a syntax or access violation. I'm unsure if oracle needs rights granted to the stored procedures or if I'm just using the wrong syntax.

Thanks for any help you can provide!
--Van

asp code below:

Dim j, c, r'*********************************************stored procedure section begins
Set c = Server.CreateObject("ADODB.Connection")
c.ConnectionTimeout = Application("Scheduler_ConnectionTimeout") 'looking for Scheduler
c.CommandTimeout = Application("Scheduler_CommandTimeout")
c.Open Application("Scheduler_ConnectionString")
Set j = Server.CreateObject ("ADODB.Command")
Set r = Server.CreateObject ("ADODB.Recordset")
Set r.ActiveConnection = c
Set j.ActiveConnection = c

j.CommandType = adCmdStoredProc
j.CommandText = "bbq"
' Add the Return Value Parameter
j.Parameters.Append j.CreateParameter("return", adInteger, adParamReturnValue )

'Add the Input Values
j.Parameters.Append j.CreateParameter("res_id", adInteger, adParamInput )
j.Parameters.Append j.CreateParameter("start", adDBTimeStamp, adParamInput )
j.Parameters.Append j.CreateParameter("end", adDBTimeStamp, adParamInput )
j.Parameters.Append j.CreateParameter("off", adInteger, adParamInput )


'Add the output parameter
j.Parameters.Append j.CreateParameter("start1", adDBTimeStamp, adParamOutput )
j.Parameters.Append j.CreateParameter("end1", adDBTimeStamp, adParamOutput )
j.Parameters.Append j.CreateParameter("result", adInteger, adParamOutput )

'Add Values to Input Params
j("res_id") = resource_id 'sets resource id value for the stored procedure

j("start") = date_desired.value&" "&start_time_desired 'sets start time value for the stored procedure
'j("end") = OracleDateTime(date_desired.value&" "&end_time_desired) 'sets end time value for the stored procedure
j("end") = date_desired.value&" "&end_time_desired
j("off") = offsetion 'sets offset value for the stored procedure
j("start1") = null 'this null value is for a output parameter from the stored procedure
j("end1") = null 'this null value is for a output parameter from the stored procedure
j("result") = NULL 'this null value is for a output parameter from the stored procedure
j.Execute
Re: calling an oracle stored procedure from an asp page [message #375163 is a reply to message #374626] Wed, 01 August 2001 17:22 Go to previous message
ernani
Messages: 2
Registered: August 2001
Junior Member
Hi dude,

You can find some help here or try to use ADOVBS.INC at your script

http://www.learnasp.com/learn/FAQOraclestoredproc.asp
Previous Topic: Stored Procedure error
Next Topic: Oracle---Tables
Goto Forum:
  


Current Time: Fri Jul 05 10:50:21 CDT 2024