SetDecimalParameterByIndex()
- Last UpdatedOct 13, 2022
- 1 minute read
Use the SetDecimalParameterByIndex() method to configure a decimal parameter as encoded into the text of an OLEDB SQL statement.
Syntax
result SetDecimalParameterByIndex (
int Index,
object ParameterValue,
aaDBParameterDirection ParameterDirection,
short Precision,
short Scale)
Parameters
Index
Sequential index of the parameter as used in the SQL statement. For example:
In the following SQL statement the parameter corresponds to the question mark (?) character:
"INSERT INTO Purchasing.PurchaseOrderDetail
(PurchaseOrderID
,DueDate
,OrderQty
,ProductID
,UnitPrice
,ReceivedQty
,RejectedQty
,ModifiedDate)
VALUES
(4,'2008-01-28',4,4,4,12.89,?,'2008-01-28') "
ParameterValue
This parameter supports float, double, or string values.
You can also specify a valid ArchestrA reference string. For example:
-
123.333
-
"123.333333333333333333"
-
me.Quantity
ParameterDirection
For possible values, see aaDBParameterDirection.
Precision
A number that indicates the total number of digits.
Scale
A number that indicates the number of digits to the right of the decimal point.
Example
SetDecimalParameterByIndex (1, me.Quantity,aaDBParameterDirection.Input, 8, 2)