@@ -146,10 +146,12 @@ if (sqlca.sqlcode < 0) dosqlprint ( );}
146
146
#line 46 "test_informix.pgc"
147
147
148
148
149
+ sqlca .sqlcode = 100 ;
149
150
ECPG_informix_set_var ( 0 , & ( i ), __LINE__ );\
150
- /* declare c cursor for select * from test where i <= $1 */
151
- #line 48 "test_informix.pgc"
151
+ ECPG_informix_reset_sqlca (); /* declare c cursor for select * from test where i <= $1 */
152
+ #line 49 "test_informix.pgc"
152
153
154
+ printf ("%ld\n" , sqlca .sqlcode );
153
155
openit ();
154
156
155
157
deccvint (0 , & j );
@@ -163,10 +165,10 @@ if (sqlca.sqlcode < 0) dosqlprint ( );}
163
165
ECPGt_NO_INDICATOR , NULL , 0L , 0L , 0L ,
164
166
ECPGt_string ,(c ),(long )10 ,(long )1 ,(10 )* sizeof (char ),
165
167
ECPGt_NO_INDICATOR , NULL , 0L , 0L , 0L , ECPGt_EORT );
166
- #line 55 "test_informix.pgc"
168
+ #line 57 "test_informix.pgc"
167
169
168
170
if (sqlca .sqlcode < 0 ) dosqlprint ( );}
169
- #line 55 "test_informix.pgc"
171
+ #line 57 "test_informix.pgc"
170
172
171
173
if (sqlca .sqlcode == 100 ) break ;
172
174
else if (sqlca .sqlcode != 0 ) printf ("Error: %ld\n" , sqlca .sqlcode );
@@ -188,53 +190,53 @@ if (sqlca.sqlcode < 0) dosqlprint ( );}
188
190
{ ECPGdo (__LINE__ , 1 , 1 , NULL , 0 , ECPGst_normal , "delete from test where i = $1 :: decimal" ,
189
191
ECPGt_decimal ,& (n ),(long )1 ,(long )1 ,sizeof (decimal ),
190
192
ECPGt_NO_INDICATOR , NULL , 0L , 0L , 0L , ECPGt_EOIT , ECPGt_EORT );
191
- #line 73 "test_informix.pgc"
193
+ #line 75 "test_informix.pgc"
192
194
193
195
if (sqlca .sqlcode < 0 ) dosqlprint ( );}
194
- #line 73 "test_informix.pgc"
196
+ #line 75 "test_informix.pgc"
195
197
196
198
printf ("DELETE: %ld\n" , sqlca .sqlcode );
197
199
198
200
{ ECPGdo (__LINE__ , 1 , 1 , NULL , 0 , ECPGst_normal , "select 1 from test where i = 14" , ECPGt_EOIT , ECPGt_EORT );
199
- #line 76 "test_informix.pgc"
201
+ #line 78 "test_informix.pgc"
200
202
201
203
if (sqlca .sqlcode < 0 ) dosqlprint ( );}
202
- #line 76 "test_informix.pgc"
204
+ #line 78 "test_informix.pgc"
203
205
204
206
printf ("Exists: %ld\n" , sqlca .sqlcode );
205
207
206
208
{ ECPGdo (__LINE__ , 1 , 1 , NULL , 0 , ECPGst_normal , "select 1 from test where i = 147" , ECPGt_EOIT , ECPGt_EORT );
207
- #line 79 "test_informix.pgc"
209
+ #line 81 "test_informix.pgc"
208
210
209
211
if (sqlca .sqlcode < 0 ) dosqlprint ( );}
210
- #line 79 "test_informix.pgc"
212
+ #line 81 "test_informix.pgc"
211
213
212
214
printf ("Does not exist: %ld\n" , sqlca .sqlcode );
213
215
214
216
{ ECPGtrans (__LINE__ , NULL , "commit" );
215
- #line 82 "test_informix.pgc"
217
+ #line 84 "test_informix.pgc"
216
218
217
219
if (sqlca .sqlcode < 0 ) dosqlprint ( );}
218
- #line 82 "test_informix.pgc"
220
+ #line 84 "test_informix.pgc"
219
221
220
222
{ ECPGdo (__LINE__ , 1 , 1 , NULL , 0 , ECPGst_normal , "drop table test" , ECPGt_EOIT , ECPGt_EORT );
221
- #line 83 "test_informix.pgc"
223
+ #line 85 "test_informix.pgc"
222
224
223
225
if (sqlca .sqlcode < 0 ) dosqlprint ( );}
224
- #line 83 "test_informix.pgc"
226
+ #line 85 "test_informix.pgc"
225
227
226
228
{ ECPGtrans (__LINE__ , NULL , "commit" );
227
- #line 84 "test_informix.pgc"
229
+ #line 86 "test_informix.pgc"
228
230
229
231
if (sqlca .sqlcode < 0 ) dosqlprint ( );}
230
- #line 84 "test_informix.pgc"
232
+ #line 86 "test_informix.pgc"
231
233
232
234
233
235
{ ECPGdisconnect (__LINE__ , "CURRENT" );
234
- #line 86 "test_informix.pgc"
236
+ #line 88 "test_informix.pgc"
235
237
236
238
if (sqlca .sqlcode < 0 ) dosqlprint ( );}
237
- #line 86 "test_informix.pgc"
239
+ #line 88 "test_informix.pgc"
238
240
239
241
240
242
return 0 ;
@@ -245,10 +247,10 @@ static void openit(void)
245
247
{ ECPGdo (__LINE__ , 1 , 1 , NULL , 0 , ECPGst_normal , "declare c cursor for select * from test where i <= $1 " ,
246
248
ECPGt_int ,& (* ( int * )(ECPG_informix_get_var ( 0 ))),(long )1 ,(long )1 ,sizeof (int ),
247
249
ECPGt_NO_INDICATOR , NULL , 0L , 0L , 0L , ECPGt_EOIT , ECPGt_EORT );
248
- #line 93 "test_informix.pgc"
250
+ #line 95 "test_informix.pgc"
249
251
250
252
if (sqlca .sqlcode < 0 ) dosqlprint ( );}
251
- #line 93 "test_informix.pgc"
253
+ #line 95 "test_informix.pgc"
252
254
253
255
}
254
256
0 commit comments