]> begriffs open source - ai-pg/blob - full-docs/txt/ecpg-sql-set-descriptor.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / ecpg-sql-set-descriptor.txt
1
2 SET DESCRIPTOR
3
4    SET DESCRIPTOR — set information in an SQL descriptor area
5
6 Synopsis
7
8 SET DESCRIPTOR descriptor_name descriptor_header_item = value [, ... ]
9 SET DESCRIPTOR descriptor_name VALUE number descriptor_item = value [, ...]
10
11 Description
12
13    SET DESCRIPTOR populates an SQL descriptor area with values. The
14    descriptor area is then typically used to bind parameters in a prepared
15    query execution.
16
17    This command has two forms: The first form applies to the descriptor
18    “header”, which is independent of a particular datum. The second form
19    assigns values to particular datums, identified by number.
20
21 Parameters
22
23    descriptor_name #
24           A descriptor name.
25
26    descriptor_header_item #
27           A token identifying which header information item to set. Only
28           COUNT, to set the number of descriptor items, is currently
29           supported.
30
31    number #
32           The number of the descriptor item to set. The count starts at 1.
33
34    descriptor_item #
35           A token identifying which item of information to set in the
36           descriptor. See Section 34.7.1 for a list of supported items.
37
38    value #
39           A value to store into the descriptor item. This can be an SQL
40           constant or a host variable.
41
42 Examples
43
44 EXEC SQL SET DESCRIPTOR indesc COUNT = 1;
45 EXEC SQL SET DESCRIPTOR indesc VALUE 1 DATA = 2;
46 EXEC SQL SET DESCRIPTOR indesc VALUE 1 DATA = :val1;
47 EXEC SQL SET DESCRIPTOR indesc VALUE 2 INDICATOR = :val1, DATA = 'some string';
48 EXEC SQL SET DESCRIPTOR indesc VALUE 2 INDICATOR = :val2null, DATA = :val2;
49
50 Compatibility
51
52    SET DESCRIPTOR is specified in the SQL standard.
53
54 See Also
55
56    ALLOCATE DESCRIPTOR, GET DESCRIPTOR