Previous Topic

Next Topic

Inhoudsopgave

Book Index

StoredProcName Property

Property Property StoredProcName: String

Description

Specifies the name of the stored procedure (without the parameters) to be executed.

Remarks

In most cases the stored procedure to be executed contains input parameters (sometimes also output parameters). How to reflect those input parameters?

First, you have to create persistence fields explicitly. The fieldname property of the persistence fields must be equal to the name of the stored procedure parameter minus the '@' sign.

In case of output parameters use the persistence fields property .Out = true

The following isah fields are used in most cases:

After creation of the persistence fields you have to assign a value to each field. The values can be read from the visual components of the Process form (user input) or can be hardcoded.

Code Snippet

Set the stored procedure name:

frmProcess.StoredProcName="SIP_prc_ScriptExample"

Create the persistence fields:

Set oParamNewFieldDate = IsahObjects.Get("IsahDateTimeField")

with oParamNewFieldDate

.Name="NewFieldDate"

.FieldName="NewFieldDate"

.Dataset=frmProcess.Dataset

end with

rem more persistence fields...

Assign values to the persistence fields:

oParamNewFieldDate.asString = formatdatetime(cdate(dtpFieldDate.Date),vbShortDate )