7#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
28#ifdef _ECPG_INFORMIX_H
63#line 15 "describe.pgc"
64 char * stmt1 =
"SELECT id, t FROM descr_t2" ;
66#line 16 "describe.pgc"
67 char * stmt2 =
"SELECT id, t FROM descr_t2 WHERE id = -1" ;
69#line 17 "describe.pgc"
70 int i , count1 , count2 ;
72#line 18 "describe.pgc"
73 char field_name1 [ 30 ] =
"not set" ;
75#line 19 "describe.pgc"
76 char field_name2 [ 30 ] =
"not set" ;
78#line 20 "describe.pgc"
85 strcpy(msg,
"connect");
86 {
ECPGconnect(__LINE__, 0,
"ecpg1_regression" , NULL, NULL , NULL, 0);
87#line 27 "describe.pgc"
89if (
sqlca.sqlcode < 0) exit (1);}
90#line 27 "describe.pgc"
95#line 30 "describe.pgc"
97if (
sqlca.sqlcode < 0) exit (1);}
98#line 30 "describe.pgc"
101 strcpy(msg,
"create");
103#line 33 "describe.pgc"
105if (
sqlca.sqlcode < 0) exit (1);}
106#line 33 "describe.pgc"
109 strcpy(msg,
"insert");
110 {
ECPGdo(__LINE__, 0, 1, NULL, 0,
ECPGst_normal,
"insert into descr_t2 ( id , t ) values ( default , 'a' )",
ECPGt_EOIT,
ECPGt_EORT);
111#line 36 "describe.pgc"
113if (
sqlca.sqlcode < 0) exit (1);}
114#line 36 "describe.pgc"
116 {
ECPGdo(__LINE__, 0, 1, NULL, 0,
ECPGst_normal,
"insert into descr_t2 ( id , t ) values ( default , 'b' )",
ECPGt_EOIT,
ECPGt_EORT);
117#line 37 "describe.pgc"
119if (
sqlca.sqlcode < 0) exit (1);}
120#line 37 "describe.pgc"
122 {
ECPGdo(__LINE__, 0, 1, NULL, 0,
ECPGst_normal,
"insert into descr_t2 ( id , t ) values ( default , 'c' )",
ECPGt_EOIT,
ECPGt_EORT);
123#line 38 "describe.pgc"
125if (
sqlca.sqlcode < 0) exit (1);}
126#line 38 "describe.pgc"
128 {
ECPGdo(__LINE__, 0, 1, NULL, 0,
ECPGst_normal,
"insert into descr_t2 ( id , t ) values ( default , 'd' )",
ECPGt_EOIT,
ECPGt_EORT);
129#line 39 "describe.pgc"
131if (
sqlca.sqlcode < 0) exit (1);}
132#line 39 "describe.pgc"
135 strcpy(msg,
"commit");
137#line 42 "describe.pgc"
139if (
sqlca.sqlcode < 0) exit (1);}
140#line 42 "describe.pgc"
149 strcpy(msg,
"allocate");
151#line 51 "describe.pgc"
153if (
sqlca.sqlcode < 0) exit (1);
154#line 51 "describe.pgc"
157#line 52 "describe.pgc"
159if (
sqlca.sqlcode < 0) exit (1);
160#line 52 "describe.pgc"
163 strcpy(msg,
"prepare");
165#line 55 "describe.pgc"
167if (
sqlca.sqlcode < 0) exit (1);}
168#line 55 "describe.pgc"
173 strcpy(msg,
"describe");
177#line 60 "describe.pgc"
182#line 61 "describe.pgc"
188#line 63 "describe.pgc"
193#line 64 "describe.pgc"
198#line 65 "describe.pgc"
219 strcpy(msg,
"get descriptor");
222#line 86 "describe.pgc"
224if (
sqlca.sqlcode < 0) exit (1);}
225#line 86 "describe.pgc"
229#line 87 "describe.pgc"
231if (
sqlca.sqlcode < 0) exit (1);}
232#line 87 "describe.pgc"
235 if (count1 != count2)
237 printf(
"count1 (%d) != count2 (%d)\n", count1, count2);
259 for (
i = 1;
i <= count1;
i++)
264#line 115 "describe.pgc"
266if (
sqlca.sqlcode < 0) exit (1);}
267#line 115 "describe.pgc"
272#line 116 "describe.pgc"
274if (
sqlca.sqlcode < 0) exit (1);}
275#line 116 "describe.pgc"
277 printf(
"%d\n\tfield_name1 '%s'\n\tfield_name2 '%s'\n\t"
278 "sqlda1 '%s'\n\tsqlda2 '%s'\n\tsqlda3 '%s'\n",
279 i, field_name1, field_name2,
285 strcpy(msg,
"deallocate");
287#line 126 "describe.pgc"
289if (
sqlca.sqlcode < 0) exit (1);
290#line 126 "describe.pgc"
293#line 127 "describe.pgc"
295if (
sqlca.sqlcode < 0) exit (1);
296#line 127 "describe.pgc"
303#line 132 "describe.pgc"
305if (
sqlca.sqlcode < 0) exit (1);}
306#line 132 "describe.pgc"
311 strcpy(msg,
"allocate");
313#line 137 "describe.pgc"
315if (
sqlca.sqlcode < 0) exit (1);
316#line 137 "describe.pgc"
319#line 138 "describe.pgc"
321if (
sqlca.sqlcode < 0) exit (1);
322#line 138 "describe.pgc"
325 strcpy(msg,
"prepare");
327#line 141 "describe.pgc"
329if (
sqlca.sqlcode < 0) exit (1);}
330#line 141 "describe.pgc"
335 strcpy(msg,
"describe");
339#line 146 "describe.pgc"
344#line 147 "describe.pgc"
350#line 149 "describe.pgc"
355#line 150 "describe.pgc"
360#line 151 "describe.pgc"
366 strcpy(msg,
"get descriptor");
369#line 157 "describe.pgc"
371if (
sqlca.sqlcode < 0) exit (1);}
372#line 157 "describe.pgc"
376#line 158 "describe.pgc"
378if (
sqlca.sqlcode < 0) exit (1);}
379#line 158 "describe.pgc"
382 if (!( count1 == count2 &&
388 for (
i = 1;
i <= count1;
i++)
393#line 168 "describe.pgc"
395if (
sqlca.sqlcode < 0) exit (1);}
396#line 168 "describe.pgc"
401#line 169 "describe.pgc"
403if (
sqlca.sqlcode < 0) exit (1);}
404#line 169 "describe.pgc"
406 printf(
"%d\n\tfield_name1 '%s'\n\tfield_name2 '%s'\n\t"
407 "sqlda1 '%s'\n\tsqlda2 '%s'\n\tsqlda3 '%s'\n",
408 i, field_name1, field_name2,
414 strcpy(msg,
"deallocate");
416#line 179 "describe.pgc"
418if (
sqlca.sqlcode < 0) exit (1);
419#line 179 "describe.pgc"
422#line 180 "describe.pgc"
424if (
sqlca.sqlcode < 0) exit (1);
425#line 180 "describe.pgc"
432#line 185 "describe.pgc"
434if (
sqlca.sqlcode < 0) exit (1);}
435#line 185 "describe.pgc"
442#line 190 "describe.pgc"
444if (
sqlca.sqlcode < 0) exit (1);}
445#line 190 "describe.pgc"
448 strcpy(msg,
"commit");
450#line 193 "describe.pgc"
452if (
sqlca.sqlcode < 0) exit (1);}
453#line 193 "describe.pgc"
456 strcpy(msg,
"disconnect");
458#line 196 "describe.pgc"
460if (
sqlca.sqlcode < 0) exit (1);}
461#line 196 "describe.pgc"
bool ECPGdisconnect(int lineno, const char *connection_name)
bool ECPGconnect(int lineno, int c, const char *name, const char *user, const char *passwd, const char *connection_name, int autocommit)
bool ECPGdeallocate_desc(int line, const char *name)
bool ECPGget_desc(int lineno, const char *desc_name, int index,...)
bool ECPGallocate_desc(int line, const char *name)
bool ECPGdescribe(int line, int compat, bool input, const char *connection_name, const char *stmt_name,...)
bool ECPGget_desc_header(int lineno, const char *desc_name, int *count)
bool ECPGdo(const int lineno, const int compat, const int force_indicator, const char *connection_name, const bool questionmarks, const int st, const char *query,...)
bool ECPGtrans(int lineno, const char *connection_name, const char *transaction)
bool ECPGprepare(int lineno, const char *connection_name, const bool questionmarks, const char *name, const char *variable)
bool ECPGdeallocate(int lineno, int c, const char *connection_name, const char *name)
struct sqlvar_struct sqlvar[1]