7#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
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);
109 {
ECPGdo(__LINE__, 0, 1, NULL, 0,
ECPGst_normal,
"insert into Test ( name , amount , letter ) values ( 'false' , 1 , 'f' )",
ECPGt_EOIT,
ECPGt_EORT);
115 {
ECPGdo(__LINE__, 0, 1, NULL, 0,
ECPGst_normal,
"insert into test ( name , amount , letter ) values ( 'true' , 2 , 't' )",
ECPGt_EOIT,
ECPGt_EORT);
131 ECPGt_int,(amount),(
long)1,(
long)6,
sizeof(
int),
133 ECPGt_char,(letter),(
long)1,(
long)6,(1)*
sizeof(
char),
152 char l = letter [
i ] [ 0 ] ;
155 int a = amount [
i ] ;
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);
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)