#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
Go to the source code of this file.
◆ ECPGdebug
◆ intarray
◆ main()
Definition at line 38 of file preproc-define.c.
39{
40
41
42
43 typedef char string [ 8 ];
44
45#line 21 "define.pgc"
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67#line 22 "define.pgc"
69
70#line 23 "define.pgc"
71 char name [ 6 ] [ 8 ] ;
72
73#line 36 "define.pgc"
75
76#if 0
77
78#line 38 "define.pgc"
80
81#endif
82
83#line 45 "define.pgc"
84
86
88
90#line 50 "define.pgc"
91
93#line 50 "define.pgc"
94
95
96 {
ECPGdo(
__LINE__, 0, 1,
NULL, 0,
ECPGst_normal,
"create table test ( name char ( 8 ) , amount int , letter char ( 1 ) )",
ECPGt_EOIT,
ECPGt_EORT);
97#line 52 "define.pgc"
98
100#line 52 "define.pgc"
101
103#line 53 "define.pgc"
104
106#line 53 "define.pgc"
107
108
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"
111
113#line 55 "define.pgc"
114
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"
117
119#line 56 "define.pgc"
120
122#line 57 "define.pgc"
123
125#line 57 "define.pgc"
126
127
135#line 59 "define.pgc"
136
138#line 59 "define.pgc"
139
140
142 {
143
144
145
146
147
148#line 64 "define.pgc"
149 string n ;
150
151#line 65 "define.pgc"
153
154#line 66 "define.pgc"
156
157#line 67 "define.pgc"
158
159
161 printf(
"name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n",
i, n,
i,
a,
i, l);
162 }
163
165#line 73 "define.pgc"
166
168#line 73 "define.pgc"
169
171#line 74 "define.pgc"
172
174#line 74 "define.pgc"
175
177#line 75 "define.pgc"
178
180#line 75 "define.pgc"
181
182
183 return 0;
184}
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)
References a, ECPGconnect(), ECPGdebug, ECPGdisconnect(), ECPGdo(), ECPGst_normal, ECPGt_char, ECPGt_EOIT, ECPGt_EORT, ECPGt_int, ECPGt_NO_INDICATOR, ECPGtrans(), fb(), i, j, name, printf, sqlca, and sqlprint().