43 typedef char string [ 8 ];
71 char name [ 6 ] [ 8 ] ;
74 char letter [ 6 ] [ 1 ] ;
89 {
ECPGconnect(__LINE__, 0,
"ecpg1_regression" , NULL, NULL , NULL, 0);
96 {
ECPGdo(__LINE__, 0, 1, NULL, 0,
ECPGst_normal,
"create table test ( name char ( 8 ) , amount int , letter char ( 1 ) )",
ECPGt_EOIT,
ECPGt_EORT);
100 #line 52 "define.pgc"
103 #line 53 "define.pgc"
106 #line 53 "define.pgc"
109 {
ECPGdo(__LINE__, 0, 1, NULL, 0,
ECPGst_normal,
"insert into Test ( name , amount , letter ) values ( 'false' , 1 , 'f' )",
ECPGt_EOIT,
ECPGt_EORT);
110 #line 55 "define.pgc"
113 #line 55 "define.pgc"
115 {
ECPGdo(__LINE__, 0, 1, NULL, 0,
ECPGst_normal,
"insert into test ( name , amount , letter ) values ( 'true' , 2 , 't' )",
ECPGt_EOIT,
ECPGt_EORT);
116 #line 56 "define.pgc"
119 #line 56 "define.pgc"
122 #line 57 "define.pgc"
125 #line 57 "define.pgc"
131 ECPGt_int,(amount),(
long)1,(
long)6,
sizeof(
int),
133 ECPGt_char,(letter),(
long)1,(
long)6,(1)*
sizeof(
char),
135 #line 59 "define.pgc"
138 #line 59 "define.pgc"
148 #line 64 "define.pgc"
151 #line 65 "define.pgc"
152 char l = letter [
i ] [ 0 ] ;
154 #line 66 "define.pgc"
155 int a = amount [
i ] ;
157 #line 67 "define.pgc"
160 strncpy(n,
name[
i], 8);
161 printf(
"name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n",
i, n,
i,
a,
i, l);
165 #line 73 "define.pgc"
168 #line 73 "define.pgc"
171 #line 74 "define.pgc"
174 #line 74 "define.pgc"
177 #line 75 "define.pgc"
180 #line 75 "define.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 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)