SetDynamicParm

Description

Specifies a value for an input parameter in the DynamicDescriptionArea that is used in an SQL OPEN or EXECUTE statement.

Only for Format 4 dynamic SQL

Use this function only in conjunction with Format 4 dynamic SQL statements.

Syntax

DynamicDescriptionArea.SetDynamicParm ( index, value )

Argument

Description

DynamicDescriptionArea

The name of the DynamicDescriptionArea, usually SQLDA.

index

An integer identifying the input parameter descriptor in which you want to set the data. Index must be less than or equal to the value in NumInputs in DynamicDescriptionArea.

value

The value you want to use to fill the input parameter descriptor identified by index.


Return value

Integer.

Returns 1 if it succeeds and -1 if an error occurs. If any argument's value is null, SetDynamicParm returns null.

Usage

SetDynamicParm specifies a value for the parameter identified by index in the array of input parameter descriptors in DynamicDescriptionArea.

Use SetDynamicParm to fill the parameters in the input parameter descriptor array in the DynamicDescriptionArea before executing an OPEN or EXECUTE statement.

Examples

This statement fills the first input parameter descriptor in SQLDA with the string MA:

SQLDA.SetDynamicParm(1, "MA")

This statement fills the fourth input parameter descriptor in SQLDA with the number 01742:

SQLDA.SetDynamicParm(4, "01742")

This statement fills the third input parameter descriptor in SQLDA with the date 12-31-2002:

SQLDA.SetDynamicParm(3, "12-31-2002")

See also

GetDynamicDate

GetDynamicDateTime

GetDynamicNumber

GetDynamicString

GetDynamicTime

Using dynamic SQL

OPEN Cursor