7 #define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y)) 15 #line 1 "regression.h" 34 int i , count = 1 , loopcount ;
40 {
ECPGconnect(__LINE__, 0,
"ecpg1_regression" , NULL, NULL , NULL, 0); }
57 if (
sqlca.sqlcode < 0) exit (1);}
67 if (
sqlca.sqlcode < 0) exit (1);}
76 if (
sqlca.sqlcode < 0) exit (1);}
85 if (
sqlca.sqlcode < 0) exit (1);}
94 if (
sqlca.sqlcode < 0) exit (1);}
108 if (
sqlca.sqlcode < 0) exit (1);}
115 for (loopcount = 0; loopcount < 100; loopcount++) {
117 ECPGt_int,&(i),(
long)1,(
long)1,
sizeof(
int),
119 ECPGt_char,(str),(
long)25,(
long)1,(25)*
sizeof(
char),
129 if (
sqlca.sqlcode < 0) exit (1);}
132 printf(
"%d: %s\n", i, str);
144 if (
sqlca.sqlcode < 0) exit (1);}
149 ECPGt_int,&(count),(
long)1,(
long)1,
sizeof(
int),
151 ECPGt_int,&(i),(
long)1,(
long)1,
sizeof(
int),
153 ECPGt_char,(str),(
long)25,(
long)1,(25)*
sizeof(
char),
160 if (
sqlca.sqlcode < 0) exit (1);}
163 printf(
"%d: %s\n", i, str);
171 if (
sqlca.sqlcode < 0) exit (1);}
179 {
ECPGdo(__LINE__, 0, 1, NULL, 0,
ECPGst_normal,
"declare D cursor for select * from My_Table where Item1 = $1",
187 if (
sqlca.sqlcode < 0) exit (1);}
192 ECPGt_int,&(i),(
long)1,(
long)1,
sizeof(
int),
194 ECPGt_char,(str),(
long)25,(
long)1,(25)*
sizeof(
char),
201 if (
sqlca.sqlcode < 0) exit (1);}
204 printf(
"%d: %s\n", i, str);
212 if (
sqlca.sqlcode < 0) exit (1);}
222 if (
sqlca.sqlcode < 0) exit (1);}
232 if (
sqlca.sqlcode < 0) exit (1);}
bool ECPGdisconnect(int lineno, const char *connection_name)
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 ECPGconnect(int lineno, int c, const char *name, const char *user, const char *passwd, const char *connection_name, int autocommit)