@@ -4793,11 +4793,32 @@ struct
4793
4793
These are the assigned <literal>SQLCODE</literal> values:
4794
4794
4795
4795
<variablelist>
4796
+ <varlistentry>
4797
+ <term>0 (<symbol>ECPG_NO_ERROR</symbol>)</term>
4798
+ <listitem>
4799
+ <para>
4800
+ Indicates no error. (SQLSTATE 00000)
4801
+ </para>
4802
+ </listitem>
4803
+ </varlistentry>
4804
+
4805
+ <varlistentry>
4806
+ <term>100 (<symbol>ECPG_NOT_FOUND</symbol>)</term>
4807
+ <listitem>
4808
+ <para>
4809
+ This is a harmless condition indicating that the last command
4810
+ retrieved or processed zero rows, or that you are at the end of
4811
+ the cursor. (SQLSTATE 02000)
4812
+ </para>
4813
+ </listitem>
4814
+ </varlistentry>
4815
+
4796
4816
<varlistentry>
4797
4817
<term>-12 (<symbol>ECPG_OUT_OF_MEMORY</symbol>)</term>
4798
4818
<listitem>
4799
4819
<para>
4800
- Indicates that your virtual memory is exhausted. (SQLSTATE
4820
+ Indicates that your virtual memory is exhausted. The numeric
4821
+ value is defined as <literal>-ENOMEM</literal>. (SQLSTATE
4801
4822
YE001)
4802
4823
</para>
4803
4824
</listitem>
@@ -4885,6 +4906,54 @@ struct
4885
4906
</listitem>
4886
4907
</varlistentry>
4887
4908
4909
+ <varlistentry>
4910
+ <term>-207 (<symbol>ECPG_NUMERIC_FORMAT</symbol>)</term>
4911
+ <listitem>
4912
+ <para>
4913
+ The host variable is of type <type>numeric</type> and the datum
4914
+ in the database is of another type and contains a value that
4915
+ cannot be interpreted as a <type>numeric</type> value.
4916
+ (SQLSTATE 42804)
4917
+ </para>
4918
+ </listitem>
4919
+ </varlistentry>
4920
+
4921
+ <varlistentry>
4922
+ <term>-208 (<symbol>ECPG_INTERVAL_FORMAT</symbol>)</term>
4923
+ <listitem>
4924
+ <para>
4925
+ The host variable is of type <type>interval</type> and the datum
4926
+ in the database is of another type and contains a value that
4927
+ cannot be interpreted as an <type>interval</type> value.
4928
+ (SQLSTATE 42804)
4929
+ </para>
4930
+ </listitem>
4931
+ </varlistentry>
4932
+
4933
+ <varlistentry>
4934
+ <term>-209 (<symbol>ECPG_DATE_FORMAT</symbol>)</term>
4935
+ <listitem>
4936
+ <para>
4937
+ The host variable is of type <type>date</type> and the datum in
4938
+ the database is of another type and contains a value that
4939
+ cannot be interpreted as a <type>date</type> value.
4940
+ (SQLSTATE 42804)
4941
+ </para>
4942
+ </listitem>
4943
+ </varlistentry>
4944
+
4945
+ <varlistentry>
4946
+ <term>-210 (<symbol>ECPG_TIMESTAMP_FORMAT</symbol>)</term>
4947
+ <listitem>
4948
+ <para>
4949
+ The host variable is of type <type>timestamp</type> and the
4950
+ datum in the database is of another type and contains a value
4951
+ that cannot be interpreted as a <type>timestamp</type> value.
4952
+ (SQLSTATE 42804)
4953
+ </para>
4954
+ </listitem>
4955
+ </varlistentry>
4956
+
4888
4957
<varlistentry>
4889
4958
<term>-211 (<symbol>ECPG_CONVERT_BOOL</symbol>)</term>
4890
4959
<listitem>
@@ -4938,6 +5007,19 @@ struct
4938
5007
</listitem>
4939
5008
</varlistentry>
4940
5009
5010
+ <![IGNORE[
5011
+ <!-- disabled by #if 0 in ecpglib -->
5012
+ <varlistentry>
5013
+ <term>-216 (<symbol>ECPG_ARRAY_INSERT</symbol>)</term>
5014
+ <listitem>
5015
+ <para>
5016
+ The value could not be inserted into the array. (SQLSTATE
5017
+ 42804)
5018
+ </para>
5019
+ </listitem>
5020
+ </varlistentry>
5021
+ ]]>
5022
+
4941
5023
<varlistentry>
4942
5024
<term>-220 (<symbol>ECPG_NO_CONN</symbol>)</term>
4943
5025
<listitem>
@@ -4968,6 +5050,16 @@ struct
4968
5050
</listitem>
4969
5051
</varlistentry>
4970
5052
5053
+ <varlistentry>
5054
+ <term>-239 (<symbol>ECPG_INFORMIX_DUPLICATE_KEY</symbol>)</term>
5055
+ <listitem>
5056
+ <para>
5057
+ Duplicate key error, violation of unique constraint (Informix
5058
+ compatibility mode). (SQLSTATE 23505)
5059
+ </para>
5060
+ </listitem>
5061
+ </varlistentry>
5062
+
4971
5063
<varlistentry>
4972
5064
<term>-240 (<symbol>ECPG_UNKNOWN_DESCRIPTOR</symbol>)</term>
4973
5065
<listitem>
@@ -5020,6 +5112,16 @@ struct
5020
5112
</listitem>
5021
5113
</varlistentry>
5022
5114
5115
+ <varlistentry>
5116
+ <term>-284 (<symbol>ECPG_INFORMIX_SUBSELECT_NOT_ONE</symbol>)</term>
5117
+ <listitem>
5118
+ <para>
5119
+ A result of the subquery is not single row (Informix
5120
+ compatibility mode). (SQLSTATE 21000)
5121
+ </para>
5122
+ </listitem>
5123
+ </varlistentry>
5124
+
5023
5125
<varlistentry>
5024
5126
<term>-400 (<symbol>ECPG_PGSQL</symbol>)</term>
5025
5127
<listitem>
@@ -5053,15 +5155,82 @@ struct
5053
5155
</varlistentry>
5054
5156
5055
5157
<varlistentry>
5056
- <term>100 (<symbol>ECPG_NOT_FOUND </symbol>)</term>
5158
+ <term>-403 (<symbol>ECPG_DUPLICATE_KEY </symbol>)</term>
5057
5159
<listitem>
5058
5160
<para>
5059
- This is a harmless condition indicating that the last command
5060
- retrieved or processed zero rows, or that you are at the end of
5061
- the cursor. (SQLSTATE 02000)
5161
+ Duplicate key error, violation of unique constraint. (SQLSTATE
5162
+ 23505)
5062
5163
</para>
5063
5164
</listitem>
5064
5165
</varlistentry>
5166
+
5167
+ <varlistentry>
5168
+ <term>-404 (<symbol>ECPG_SUBSELECT_NOT_ONE</symbol>)</term>
5169
+ <listitem>
5170
+ <para>
5171
+ A result for the subquery is not single row. (SQLSTATE 21000)
5172
+ </para>
5173
+ </listitem>
5174
+ </varlistentry>
5175
+
5176
+ <![IGNORE[
5177
+ <!-- currently not used by the code -->
5178
+ <varlistentry>
5179
+ <term>-600 (<symbol>ECPG_WARNING_UNRECOGNIZED</symbol>)</term>
5180
+ <listitem>
5181
+ <para>
5182
+ An unrecognized warning was received from the server.
5183
+ </para>
5184
+ </listitem>
5185
+ </varlistentry>
5186
+
5187
+ <varlistentry>
5188
+ <term>-601 (<symbol>ECPG_WARNING_QUERY_IGNORED</symbol>)</term>
5189
+ <listitem>
5190
+ <para>
5191
+ Current transaction is aborted. Queries are ignored until the
5192
+ end of the transaction block.
5193
+ </para>
5194
+ </listitem>
5195
+ </varlistentry>
5196
+ ]]>
5197
+
5198
+ <varlistentry>
5199
+ <term>-602 (<symbol>ECPG_WARNING_UNKNOWN_PORTAL</symbol>)</term>
5200
+ <listitem>
5201
+ <para>
5202
+ An invalid cursor name was specified. (SQLSTATE 34000)
5203
+ </para>
5204
+ </listitem>
5205
+ </varlistentry>
5206
+
5207
+ <varlistentry>
5208
+ <term>-603 (<symbol>ECPG_WARNING_IN_TRANSACTION</symbol>)</term>
5209
+ <listitem>
5210
+ <para>
5211
+ Transaction is in progress. (SQLSTATE 25001)
5212
+ </para>
5213
+ </listitem>
5214
+ </varlistentry>
5215
+
5216
+ <varlistentry>
5217
+ <term>-604 (<symbol>ECPG_WARNING_NO_TRANSACTION</symbol>)</term>
5218
+ <listitem>
5219
+ <para>
5220
+ There is no active (in-progress) transaction. (SQLSTATE 25P01)
5221
+ </para>
5222
+ </listitem>
5223
+ </varlistentry>
5224
+
5225
+ <varlistentry>
5226
+ <term>-605 (<symbol>ECPG_WARNING_PORTAL_EXISTS</symbol>)</term>
5227
+ <listitem>
5228
+ <para>
5229
+ An existing cursor name was specified. (SQLSTATE 42P03)
5230
+ </para>
5231
+ </listitem>
5232
+ </varlistentry>
5233
+
5065
5234
</variablelist>
5066
5235
</para>
5067
5236
</sect2>