SETSMALLINT Method
Sets the designated parameter to the specified value of type SMALLINT.
| Restriction: | This method is not supported on the CAS server. |
|---|
Table of Contents
Syntax
Required Arguments
package
specifies an instance of the SQLSTMT package.
index
specifies the parameter index ordered sequentially, starting at 1.
value
specifies the value to which to set the designated parameter. The designated parameter is specified by index.
| Tip | value can be a literal, variable, or expression. |
|---|
Details
When an SQLSTMT instance is created, the FedSQL statement is allocated and prepared. If the FedSQL statement contains parameters, values to substitute for the parameters must be obtained to execute the FedSQL statement. The substitution values can be specified with either the current values of bound variables or with the package’s SETtype methods.
If the designated parameter's
type is not type SMALLINT, the SMALLINT value is converted to the
designated parameter's type. For example, if you use setsmallint(1,
3) to set parameter 1 to SMALLINT value 3, and parameter
1 is type CHAR, the SMALLINT value 3 is converted to the CHAR value
3 and the CHAR value is used to set the parameter.
Parameter data must be specified exclusively with bound variables or exclusively with the SETtype methods. A run-time error results if variables are bound to parameters and the SETSMALLINT method is invoked.
The SETSMALLINT method returns a status indicator. Zero is returned for successful execution; 1 is returned if there is an error.
For more information, see Specifying FedSQL Statement Parameter Values in SAS DS2 Programmer’s Guide.
See Also
-
Using the SQLSTMT Package in SAS DS2 Programmer’s Guide
-
Methods: