#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
#include <stdio.h>
#include <stdlib.h>
Go to the source code of this file.
◆ ECPGdebug
◆ main()
Definition at line 53 of file sql-binary.c.
54{
55
56
57
58
59
60#line 22 "binary.pgc"
62
63#line 23 "binary.pgc"
64 char * pointer =
NULL ;
65
66#line 24 "binary.pgc"
67 char *
data =
"\\001\\155\\000\\212" ;
68
69#line 25 "binary.pgc"
70
72
74
77#line 31 "binary.pgc"
78
80#line 31 "binary.pgc"
81
83#line 32 "binary.pgc"
84
86#line 32 "binary.pgc"
87
88 {
ECPGdo(
__LINE__, 0, 1,
NULL, 0,
ECPGst_normal,
"create table empl ( idnum integer , name char ( 20 ) , accs smallint , byte bytea )",
ECPGt_EOIT,
ECPGt_EORT);
89#line 34 "binary.pgc"
90
92#line 34 "binary.pgc"
93
94 {
ECPGdo(
__LINE__, 0, 1,
NULL, 0,
ECPGst_normal,
"insert into empl values ( 1 , 'first user' , 320 , $1 )",
97#line 35 "binary.pgc"
98
100#line 35 "binary.pgc"
101
103
104#line 36 "binary.pgc"
105
107#line 36 "binary.pgc"
108
109#line 36 "binary.pgc"
110
114#line 37 "binary.pgc"
115
117#line 37 "binary.pgc"
118
126#line 38 "binary.pgc"
127
129#line 38 "binary.pgc"
130
132
134#line 41 "binary.pgc"
135
137#line 41 "binary.pgc"
138
139
142
143#line 44 "binary.pgc"
144
146#line 44 "binary.pgc"
147
148#line 44 "binary.pgc"
149
153#line 45 "binary.pgc"
154
156#line 45 "binary.pgc"
157
165#line 46 "binary.pgc"
166
168#line 46 "binary.pgc"
169
171#line 47 "binary.pgc"
172
174#line 47 "binary.pgc"
175
176
177
182
184
185#line 55 "binary.pgc"
186
188#line 55 "binary.pgc"
189
190#line 55 "binary.pgc"
191
195#line 56 "binary.pgc"
196
198#line 56 "binary.pgc"
199
201 ECPGt_char,&(pointer),(
long)0,(
long)1,(1)*
sizeof(
char),
203#line 57 "binary.pgc"
204
206#line 57 "binary.pgc"
207
209#line 58 "binary.pgc"
210
212#line 58 "binary.pgc"
213
214
215 if (pointer) {
218 printf(
"(%o)", (
unsigned char)pointer[
i]);
221 }
222
224#line 68 "binary.pgc"
225
227#line 68 "binary.pgc"
228
230}
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,...)
void ECPGset_var(int number, void *pointer, int lineno)
References data, ECPGconnect(), ECPGdebug, ECPGdisconnect(), ECPGdo(), ECPGset_var(), ECPGst_normal, ECPGt_char, ECPGt_EOIT, ECPGt_EORT, ECPGt_long, ECPGt_NO_INDICATOR, ECPGt_short, fb(), free, i, printf, and sqlca.