Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ InTouch HMI

SQLSetParamDecimal() function

  • Last UpdatedJun 17, 2024
  • 1 minute read

The SQLSetParamDecimal() function sets the value of a parameter to a decimal number.

Category

SQL

Syntax

SQLSetParamDecimal(StatementID, ParameterNumber, Value, Precision, Scale);

Arguments

StatementID

Integer value that identifies a SQL statement within a query.

ParameterNumber

Integer value that identifies the parameter in the SQL statement identified by the StatementID argument.

Value

Value can be either a string or an InTouch message tag that represents a decimal number (123.456) or an InTouch memory real tag.

It is recommended that a message tag is used instead of a real tag to guarantee the precision of the parameter. However, if Value must be a floating point number (for example, a real value received from an DAServer), the function continues to work. But, high precision may not be guaranteed because of the limitation of floating point representation.

Precision

Integer that specifies the total number of digits in the number.

Scale

Integer that specifies the number of digits to the right of the decimal point.

Example

This example sets the second parameter of the third SQL statement to 123.456. The precision is six digits and the scale is three digits to the right of the decimal point.

SQLSetParamFloat(3, 2, 123.456, 6, 3);

See Also

SQLPrepareStatement()

In This Topic
TitleResults for “How to create a CRG?”Also Available in