jkunstman
Posts: 2
|
| Posted: 02/22/2008, 9:27 AM |
|
I am using CCS 3.2 and ASP 3.0 with templates.
I am executing a custom insert stored procedure. I have an output parameter that returns the @@Identity via an output parameter for the recently inserted record. How do I access the output parameter either from the parameters page or from code. I want the record page to show this recently added record.
Below is the code for my Insert method.
Sub Insert(Cmd)
CmdExecution = True
CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeBuildInsert", Me)
Set Cmd.Connection = Connection
Cmd.CommandOperation = cmdExec
With Cmd
.CommandType = dsProcedure
.SP = "usp_QuoteDetail_INS;1"
.CommandParameters = Array( _
Array("@RETURN_VALUE", "urlRETURN_VALUE", adInteger, adParamReturnValue, 0, 0, 10, Empty, Empty), _
Array("@QuoteUserID", "postlstUnderwriter", adInteger, adParamInput, 0, 0, 10, Empty, Empty), _
Array("@TeamID", "posthidTeamID", adInteger, adParamInput, 0, 0, 10, Empty, Empty), _
Array("@GroupName", "postGroupName", adVarChar, adParamInput, 50, 0, 10, Empty, Empty), _
Array("@GroupNumber", "postGroupNumber", adVarChar, adParamInput, 10, 0, 10, Empty, Empty), _
Array("@CallerName", "postCallerName", adVarChar, adParamInput, 30, 0, 10, Empty, Empty), _
Array("@RGOID", "posthidRGOID", adInteger, adParamInput, 30, 0, 10, Empty, Empty), _
Array("@MarketID", "posthidMarketID", adTinyInt, adParamInput, 30, 0, 3, Empty, Empty), _
Array("@CallTypeID", "postlstQuoteType", adInteger, adParamInput, 30, 0, 10, Empty, Empty), _
Array("@LivesCategoryID", "postLives", adInteger, adParamInput, 30, 0, 10, Empty, Empty), _
Array("@Email", "postEmail", adBoolean, adParamInput, 30, 0, 10, 0, Empty), _
Array("@Rush", "postRush", adBoolean, adParamInput, 30, 0, 10, 0, Empty), _
Array("@MedicalUW", "postMedCond", adBoolean, adParamInput, 30, 0, 10, 0, Empty), _
Array("@CallBackCtr", "postCallBack_Ct", adInteger, adParamInput, 30, 0, 10, Empty, Empty), _
Array("@DateReceived", "postDateReceived", adDBTimeStamp, adParamInput, 30, 0, 10, Empty, Array("ShortDate")), _
Array("@DateReviewed", "postDateReviewed", adDBTimeStamp, adParamInput, 30, 0, 10, Empty, Array("ShortDate")), _
Array("@DateInfoReceived", "postDateInfoReceived", adDBTimeStamp, adParamInput, 30, 0, 10, Empty, Array("ShortDate")), _
Array("@DateFinalDecision", "postDateFinalDecision", adDBTimeStamp, adParamInput, 30, 0, 10, Empty, Array("ShortDate")), _
Array("@DateReported", "posthidReportDate", adDBTimeStamp, adParamInput, 30, 0, 10, Empty, Array("ShortDate")), _
Array("@FinalDecisionID", "postlstFinalDecision", adTinyInt, adParamInput, 30, 0, 3, Empty, Empty), _
Array("@Coverages", "postlstCoverages", adVarChar, adParamInput, 50, 0, 3, Empty, Empty), _
Array("@QuoteID_RET", "sesQuoteID_RET", adInteger, adParamOutput, 50, 0, 10, Empty, Empty))
Set .Parameters.Connection = Connection
.Parameters.AddParameter "@RETURN_VALUE" , "urlRETURN_VALUE", ccsInteger, Empty, Empty, Empty, False
.Parameters.AddParameter "@QuoteID_RET" , "sesQuoteID_RET", ccsInteger, Empty, Empty, Empty, False
End With
CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeExecuteInsert", Me)
If Errors.Count = 0 And CmdExecution Then
Cmd.Exec(Errors)
CCSEventResult = CCRaiseEvent(CCSEvents, "AfterExecuteInsert", Me)
End If
End Sub
|
 |
 |
|