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("ADODB.Command"
With objCmd
.ActiveConnection = objDBConn 'You can also just specify a connection string here
.CommandText = "CSBGFunding"
.CommandType = &H0004
'Add Return Value Parameters
.Parameters.Append .CreateParameter("RetVal", 11, &H0004)
'Add Input Parameters
.Parameters.Append .CreateParameter("p_ContractID", 3, &H0001, ,intContractid)
'Execute the function
'If not returning a recordset, use the adExecuteNoRecords parameter option
.Execute
blnCSBGFunding = .Parameters("RetVal"
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.
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("ADODB.Command"
With objCmd
.ActiveConnection = objDBConn 'You can also just specify a connection string here
.CommandText = "CSBGFunding"
.CommandType = &H0004
'Add Return Value Parameters
.Parameters.Append .CreateParameter("RetVal", 11, &H0004)
'Add Input Parameters
.Parameters.Append .CreateParameter("p_ContractID", 3, &H0001, ,intContractid)
'Execute the function
'If not returning a recordset, use the adExecuteNoRecords parameter option
.Execute
blnCSBGFunding = .Parameters("RetVal"
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.