@@ -312,14 +312,14 @@ current=testdb1 (should be testdb1)
312
312
</para>
313
313
314
314
<para>
315
- The third option is to declare asql identifier linked to
315
+ The third option is to declare aSQL identifier linked to
316
316
the connection, for example:
317
317
<programlisting>
318
318
EXEC SQL AT <replaceable>connection-name</replaceable> DECLARE <replaceable>statement-name</replaceable> STATEMENT;
319
319
EXEC SQL PREPARE <replaceable>statement-name</replaceable> FROM :<replaceable>dyn-string</replaceable>;
320
320
</programlisting>
321
- Once you link asql identifier to a connection,you execute a dynamic SQL
322
- withoutAT clause.
321
+ Once you link aSQL identifier to a connection, execute dynamic SQL
322
+ statements using this identifier withoutthe <literal>AT</literal> clause.
323
323
</para>
324
324
</sect2>
325
325
@@ -1209,8 +1209,8 @@ EXEC SQL END DECLARE SECTION;
1209
1209
<title id="ecpg-type-bytea">bytea</title>
1210
1210
1211
1211
<para>
1212
- The handling of the <type>bytea</type> type isalso similar to
1213
- the <type>VARCHAR</type>. The definition on an array of type
1212
+ The handling of the <type>bytea</type> type is similar to
1213
+ that of <type>VARCHAR</type>. The definition on an array of type
1214
1214
<type>bytea</type> is converted into a named struct for every
1215
1215
variable. A declaration like:
1216
1216
<programlisting>
@@ -1221,8 +1221,8 @@ bytea var[180];
1221
1221
struct bytea_var { int len; char arr[180]; } var;
1222
1222
</programlisting>
1223
1223
The member <structfield>arr</structfield> hosts binary format
1224
- data. Italso canhandle even <literal>'\0'</literal> as part of
1225
- data unlike <type>VARCHAR</type>.
1224
+ data. It canalso handle <literal>'\0'</literal> as part of
1225
+ data, unlike <type>VARCHAR</type>.
1226
1226
The data is converted from/to hex format and sent/received by
1227
1227
ecpglib.
1228
1228
</para>
@@ -6810,7 +6810,7 @@ EXEC SQL DECLARE cur1 CURSOR FOR stmt1;
6810
6810
<refentry id="ecpg-sql-declare-statement">
6811
6811
<refnamediv>
6812
6812
<refname>DECLARE STATEMENT</refname>
6813
- <refpurpose>declares SQL statement identifier associated with connection</refpurpose>
6813
+ <refpurpose>declaresa SQL statement identifier associated with connection</refpurpose>
6814
6814
</refnamediv>
6815
6815
6816
6816
<refsynopsisdiv>
@@ -6823,12 +6823,13 @@ EXEC SQL [ AT <replaceable class="parameter">connection_name</replaceable> ] DEC
6823
6823
<title>Description</title>
6824
6824
6825
6825
<para>
6826
- <command>DECLARE STATEMENT</command> declares SQL statement identifier.
6827
- SQL statement identifier is associated with connection.
6826
+ <command>DECLARE STATEMENT</command> declaresa SQL statement identifier
6827
+ to be associated with connection.
6828
6828
</para>
6829
6829
6830
6830
<para>
6831
- <command>DECLARE CURSOR</command> with a SQL statement identifier can be written before PREPARE.
6831
+ <command>DECLARE CURSOR</command> with an SQL statement identifier
6832
+ can be written before <command>PREPARE</command>.
6832
6833
</para>
6833
6834
</refsect1>
6834
6835
@@ -6843,7 +6844,8 @@ EXEC SQL [ AT <replaceable class="parameter">connection_name</replaceable> ] DEC
6843
6844
A database connection name established by the <command>CONNECT</command> command.
6844
6845
</para>
6845
6846
<para>
6846
- If AT clause is omitted, an SQL statement identifier is associated with the DEFAULT connection.
6847
+ If the <literal>AT</literal> clause is omitted, the SQL statement
6848
+ identifier is associated with the <literal>DEFAULT</literal> connection.
6847
6849
</para>
6848
6850
</listitem>
6849
6851
</varlistentry>
@@ -6854,7 +6856,8 @@ EXEC SQL [ AT <replaceable class="parameter">connection_name</replaceable> ] DEC
6854
6856
<term><replaceable class="parameter">statement_name</replaceable></term>
6855
6857
<listitem>
6856
6858
<para>
6857
- The name of a SQL statement identifier, either as an SQL identifier or a host variable.
6859
+ The name of the SQL statement identifier, either as an SQL identifier
6860
+ or a host variable.
6858
6861
</para>
6859
6862
</listitem>
6860
6863
</varlistentry>
@@ -6864,26 +6867,27 @@ EXEC SQL [ AT <replaceable class="parameter">connection_name</replaceable> ] DEC
6864
6867
<refsect1>
6865
6868
<title>Notes</title>
6866
6869
<para>
6867
- AT clause can be used at other dynamic SQL statements. The following table
6868
- gives the connected database when AT clause is used at DECLARE STATEMENT
6869
- and other dynamic statements.
6870
+ The <literal>AT</literal> clause can be used with both
6871
+ <command>DECLARE STATEMENT</command> and other dynamic SQL statements.
6872
+ The following table illustrates how it affects the selected database
6873
+ connection.
6870
6874
</para>
6871
6875
<table tocentry="1" id="ecpg-declare-statement-table">
6872
6876
<title>Scenario</title>
6873
6877
<tgroup cols="4">
6874
6878
<thead>
6875
6879
<row>
6876
6880
<entry>
6877
- Using Scenario
6881
+ Usage Scenario
6878
6882
</entry>
6879
6883
<entry>
6880
- Declare Statement
6884
+ DECLARE STATEMENT
6881
6885
</entry>
6882
6886
<entry>
6883
6887
Other Dynamic Statements
6884
6888
</entry>
6885
6889
<entry>
6886
- Executed Database
6890
+ Target Database
6887
6891
</entry>
6888
6892
</row>
6889
6893
</thead>
@@ -6893,10 +6897,10 @@ EXEC SQL [ AT <replaceable class="parameter">connection_name</replaceable> ] DEC
6893
6897
1
6894
6898
</entry>
6895
6899
<entry>
6896
- WithoutAT clause
6900
+ Without<literal>AT</literal>
6897
6901
</entry>
6898
6902
<entry>
6899
- WithoutAT clause
6903
+ Without<literal>AT</literal>
6900
6904
</entry>
6901
6905
<entry>
6902
6906
Default connection
@@ -6907,10 +6911,10 @@ EXEC SQL [ AT <replaceable class="parameter">connection_name</replaceable> ] DEC
6907
6911
2
6908
6912
</entry>
6909
6913
<entry>
6910
- Using AT clause connecting at con1
6914
+ With <literal>AT</literal> that connects to <literal> con1</literal>
6911
6915
</entry>
6912
6916
<entry>
6913
- WithoutAT clause
6917
+ Without<literal>AT</literal>
6914
6918
</entry>
6915
6919
<entry>
6916
6920
con1
@@ -6921,10 +6925,10 @@ EXEC SQL [ AT <replaceable class="parameter">connection_name</replaceable> ] DEC
6921
6925
3
6922
6926
</entry>
6923
6927
<entry>
6924
- Using AT clause connecting at con1
6928
+ With <literal>AT</literal> that connects to <literal> con1</literal>
6925
6929
</entry>
6926
6930
<entry>
6927
- Using AT clause connecting at con2
6931
+ With <literal>AT</literal> that connects to <literal> con2</literal>
6928
6932
</entry>
6929
6933
<entry>
6930
6934
con1
@@ -6935,10 +6939,10 @@ EXEC SQL [ AT <replaceable class="parameter">connection_name</replaceable> ] DEC
6935
6939
4
6936
6940
</entry>
6937
6941
<entry>
6938
- WithoutAT clause
6942
+ Without<literal>AT</literal>
6939
6943
</entry>
6940
6944
<entry>
6941
- Using AT clause connecting at con2
6945
+ With <literal>AT</literal> that connects to <literal> con2</literal>
6942
6946
</entry>
6943
6947
<entry>
6944
6948
con2
@@ -6948,7 +6952,7 @@ EXEC SQL [ AT <replaceable class="parameter">connection_name</replaceable> ] DEC
6948
6952
</tgroup>
6949
6953
</table>
6950
6954
<para>
6951
- In scenario 4, DECLARE STATEMENT will be ignored.
6955
+ In scenario 4,<command> DECLARE STATEMENT</command> will be ignored.
6952
6956
</para>
6953
6957
</refsect1>
6954
6958