39 #line 15 "whenever_do_continue.pgc"
41 #line 12 "whenever_do_continue.pgc"
44 #line 13 "whenever_do_continue.pgc"
47 #line 14 "whenever_do_continue.pgc"
51 #line 16 "whenever_do_continue.pgc"
54 #line 17 "whenever_do_continue.pgc"
57 #line 18 "whenever_do_continue.pgc"
62 strcpy(msg,
"connect");
63 {
ECPGconnect(__LINE__, 0,
"ecpg1_regression" , NULL, NULL , NULL, 0);
64 #line 23 "whenever_do_continue.pgc"
67 #line 23 "whenever_do_continue.pgc"
70 strcpy(msg,
"create");
71 {
ECPGdo(__LINE__, 0, 1, NULL, 0,
ECPGst_normal,
"create table emp ( ename varchar , sal double precision , comm double precision )",
ECPGt_EOIT,
ECPGt_EORT);
72 #line 26 "whenever_do_continue.pgc"
75 #line 26 "whenever_do_continue.pgc"
78 strcpy(msg,
"insert");
79 {
ECPGdo(__LINE__, 0, 1, NULL, 0,
ECPGst_normal,
"insert into emp values ( 'Ram' , 111100 , 21 )",
ECPGt_EOIT,
ECPGt_EORT);
80 #line 29 "whenever_do_continue.pgc"
83 #line 29 "whenever_do_continue.pgc"
85 {
ECPGdo(__LINE__, 0, 1, NULL, 0,
ECPGst_normal,
"insert into emp values ( 'aryan' , 11110 , null )",
ECPGt_EOIT,
ECPGt_EORT);
86 #line 30 "whenever_do_continue.pgc"
89 #line 30 "whenever_do_continue.pgc"
91 {
ECPGdo(__LINE__, 0, 1, NULL, 0,
ECPGst_normal,
"insert into emp values ( 'josh' , 10000 , 10 )",
ECPGt_EOIT,
ECPGt_EORT);
92 #line 31 "whenever_do_continue.pgc"
95 #line 31 "whenever_do_continue.pgc"
97 {
ECPGdo(__LINE__, 0, 1, NULL, 0,
ECPGst_normal,
"insert into emp values ( 'tom' , 20000 , null )",
ECPGt_EOIT,
ECPGt_EORT);
98 #line 32 "whenever_do_continue.pgc"
101 #line 32 "whenever_do_continue.pgc"
105 #line 34 "whenever_do_continue.pgc"
108 {
ECPGdo(__LINE__, 0, 1, NULL, 0,
ECPGst_normal,
"declare c cursor for select ename , sal , comm from emp order by ename collate \"C\" asc",
ECPGt_EOIT,
ECPGt_EORT);
109 #line 36 "whenever_do_continue.pgc"
112 #line 36 "whenever_do_continue.pgc"
117 #line 39 "whenever_do_continue.pgc"
122 #line 42 "whenever_do_continue.pgc"
125 for (loopcount = 0; loopcount < 100; loopcount++)
128 ECPGt_char,&(emp.ename),(
long)12,(
long)1,(12)*
sizeof(
char),
130 ECPGt_float,&(emp.sal),(
long)1,(
long)1,
sizeof(
float),
132 ECPGt_float,&(emp.comm),(
long)1,(
long)1,
sizeof(
float),
134 #line 46 "whenever_do_continue.pgc"
137 #line 46 "whenever_do_continue.pgc"
139 if (
sqlca.sqlcode < 0)
continue;}
140 #line 46 "whenever_do_continue.pgc"
143 printf(
"%s %7.2f %9.2f\n", emp.ename, emp.sal, emp.comm);
151 #line 55 "whenever_do_continue.pgc"
155 #line 57 "whenever_do_continue.pgc"
160 #line 60 "whenever_do_continue.pgc"
bool ECPGconnect(int lineno, int c, const char *name, const char *user, const char *passwd, const char *connection_name, int autocommit)
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,...)