Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP calling up an Oracle stored procedure difficulty

Status
Not open for further replies.

InShadows

IS-IT--Management
Jul 7, 2000
36
US
I am having problems getting the ASP call to the stored procedure to work. Below is the Oracle stored procedure.

Function CSBGFunding(
p_ContractID Contract.ContractID%Type)
Return Boolean As

RetVal Boolean;
v_CSBGPercent Number(3);

Begin
--get the CSBG Funding Percentage for the given contract
Select CSBGPercent
Into v_CSBGPercent
From Contract
Where ContractID = p_ContractID;

--If the CSBG Funding Percentage <> 0 or Null, then Return TRUE. Otherwise, return FALSE.
If v_CSBGPercent = 0 Then
RetVal := false;
Elsif v_CSBGPercent is null then

RetVal := false;
Else
RetVal := True;
End If;

Return RetVal;

End CSBGFunding;


roughly it goes and grabs the contract id that I give it and checks a value to see if it's null or 0 and then returns either true or false.
That seems to work fine. And then in the ASP I wrote the following call:

'call up the stored procedure CSBGFunding and have the other Totals calculated
Dim objCmd

'Instantiate objects
set objCmd = Server.CreateObject(&quot;ADODB.Command&quot;)

With objCmd
.ActiveConnection = objDBConn 'You can also just specify a connection string here
.CommandText = &quot;CSBGFunding&quot;
.CommandType = &H0004

'Add Return Value Parameters

.Parameters.Append .CreateParameter(&quot;RetVal&quot;, 11, &H0004)

'Add Input Parameters

.Parameters.Append .CreateParameter(&quot;p_ContractID&quot;, 3, &H0001, ,intContractid)

'Execute the function
'If not returning a recordset, use the adExecuteNoRecords parameter option
.Execute
blnCSBGFunding = .Parameters(&quot;RetVal&quot;)
End With

I have two parameters, a return value and an input value. The addatatypes aren't in it because we are not supposed to you those include files.

The error I am receiving is:

OraOLEDB error '80004005'

ðïÎ

/ccfpadmin/ca_new_service.asp, line 208


where line 208 is the .Execute line. Any help would be much appreciated.. thanks.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top