
Dynamic SQL Operations
HP NonStop SQL/MP Programming Manual for C—429847-008
10-3
Dynamic SQL Features
Dynamic SQL Features
SQLDA Structure, Names Buffer, and Collation Buffer
NonStop SQL/MP uses the SQLDA structure to return information about input
parameters and output variables in dynamic SQL statements. The SQLDA structure
also provides a pointer to these buffers:
Names buffer––Receives the names of input parameters or output variables
Collation buffer––Receives copies of any collations used by columns in the query
You can use the SQLDA structure in these statements:
A DESCRIBE INPUT statement to get information about input parameters
A DESCRIBE statement to return information about output columns or copies of
any collations used by the columns
The USING DESCRIPTOR clause of a FETCH statement to fill a cursor with rows
from an SQL table
The USING DESCRIPTOR clause of an EXECUTE statement to run a dynamic
SQL statement
Declaring the SQLDA Structure
To declare an SQLDA structure, use the INCLUDE SQLDA directive as follows:
sqlda-name
is the SQLDA structure name; it must follow the conventions for a C identifier.
sqlvar-count
is the number of input parameters (plus indicator parameters) for which you expect
to specify values, or the number of columns for which you expect to receive output
values. The C compiler creates a separate SQLVAR structure within the SQLDA
structure for each parameter or column.
The default for
sqlvar-count
is 1.
INCLUDE SQLDA (
sqlda-name
[ ,
sqlvar-count
]
[ ,
names-buffer
,
max-name-length
]
[ ,
release-option
]
[ , CPRULES
collation-buffer
,
max-collation-size
] ) ;
Содержание NonStop SQL/MP
Страница 4: ......
Страница 14: ...Contents HP NonStop SQL MP Programming Manual for C 429847 008 x ...
Страница 34: ...Introduction HP NonStop SQL MP Programming Manual for C 429847 008 1 8 SQL MP Version Management ...
Страница 60: ...Host Variables HP NonStop SQL MP Programming Manual for C 429847 008 2 26 VARCHAR Data Type ...
Страница 68: ...SQL MP Statements and Directives HP NonStop SQL MP Programming Manual for C 429847 008 3 8 Finding Information ...
Страница 156: ...Explicit Program Compilation HP NonStop SQL MP Programming Manual for C 429847 008 6 40 SQL Program Files ...
Страница 264: ...Dynamic SQL Operations HP NonStop SQL MP Programming Manual for C 429847 008 10 66 Detailed Dynamic SQL Program ...
Страница 294: ...SQL MP Sample Database HP NonStop SQL MP Programming Manual for C 429847 008 A 6 ...
Страница 300: ...Memory Considerations HP NonStop SQL MP Programming Manual for C 429847 008 B 6 Avoiding Memory Stack Overflows ...
Страница 304: ...Maximizing Local Autonomy HP NonStop SQL MP Programming Manual for C 429847 008 C 4 Skipping Unavailable Partitions ...