Chapter 9 SQL Statements
611
SET DESCRIPTOR statement [ESQL]
Use this statement to describe the variables in a SQL descriptor area and to
place data into the descriptor area.
SET DESCRIPTOR
descriptor-name
…{ COUNT = {
integer
|
hostvar
} | VALUE
n
assignment
[, …] }
assignment:
{ TYPE | SCALE | PRECISION | LENGTH | INDICATOR }
… = {
integer
|
hostvar
}
| DATA =
hostvar
None.
None.
"ALLOCATE DESCRIPTOR statement" on page 381
"DEALLOCATE DESCRIPTOR statement" on page 485
"The SQL descriptor area (SQLDA)" on page 45 of the book ASA
Programming Interfaces Guide
The SET DESCRIPTOR statement is used to describe the variables in a
descriptor area, and to place data into the descriptor area.
The SET … COUNT statement sets the number of described variables within
the descriptor area. The value for count must not exceed the number of
variables specified when the descriptor area was allocated.
The value n specifies the variable in the descriptor area upon which the
assignment(s) will be performed.
Type checking is performed when doing SET … DATA, to ensure that the
variable in the descriptor area has the same type as the host variable.
If an error occurs, the code is returned in the SQLCA.
♦
SQL/92 Intermediate level feature.
♦
Sybase Supported by Open Client/Open Server.
♦ For an example, see "ALLOCATE DESCRIPTOR statement" on
page 381.
Function
Syntax
Permissions
Side effects
See also
Description
Standards and
compatibility
Example