]> begriffs open source - ai-pg/blob - full-docs/txt/ecpg-sql-open.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / ecpg-sql-open.txt
1
2 OPEN
3
4    OPEN — open a dynamic cursor
5
6 Synopsis
7
8 OPEN cursor_name
9 OPEN cursor_name USING value [, ... ]
10 OPEN cursor_name USING SQL DESCRIPTOR descriptor_name
11
12 Description
13
14    OPEN opens a cursor and optionally binds actual values to the
15    placeholders in the cursor's declaration. The cursor must previously
16    have been declared with the DECLARE command. The execution of OPEN
17    causes the query to start executing on the server.
18
19 Parameters
20
21    cursor_name #
22           The name of the cursor to be opened. This can be an SQL
23           identifier or a host variable.
24
25    value #
26           A value to be bound to a placeholder in the cursor. This can be
27           an SQL constant, a host variable, or a host variable with
28           indicator.
29
30    descriptor_name #
31           The name of a descriptor containing values to be bound to the
32           placeholders in the cursor. This can be an SQL identifier or a
33           host variable.
34
35 Examples
36
37 EXEC SQL OPEN a;
38 EXEC SQL OPEN d USING 1, 'test';
39 EXEC SQL OPEN c1 USING SQL DESCRIPTOR mydesc;
40 EXEC SQL OPEN :curname1;
41
42 Compatibility
43
44    OPEN is specified in the SQL standard.
45
46 See Also
47
48    DECLARE, CLOSE