33{
34
35
36
37
38
39
40#line 17 "test6.pgc"
42
43#line 18 "test6.pgc"
45
46#line 19 "test6.pgc"
47 char val2 [ 6 ] =
"data1" ;
48
49#line 20 "test6.pgc"
50 char *
stmt1 =
"SELECT * from test1 where a = $1 and b = $2" ;
51
52#line 21 "test6.pgc"
53
54
56
57
59#line 26 "test6.pgc"
60
61
62
63 printf(
"Test 1: Try to get descriptor on a disconnected connection\n");
65#line 30 "test6.pgc"
66
67 {
ECPGdo(
__LINE__, 0, 1,
NULL, 0,
ECPGst_normal,
"insert into test1 ( a , b ) values ( 1 , 'data1' )",
ECPGt_EOIT,
ECPGt_EORT);}
68#line 31 "test6.pgc"
69
70
72#line 33 "test6.pgc"
73
75#line 34 "test6.pgc"
76
77
79#line 36 "test6.pgc"
80
81
84}
85#line 38 "test6.pgc"
86
89}
90#line 39 "test6.pgc"
91
92
98#line 41 "test6.pgc"
99
100
102#line 43 "test6.pgc"
103
105#line 44 "test6.pgc"
106
109}
110#line 45 "test6.pgc"
111
113
114
115 printf(
"Test 2: deallocate all with non-existent connection\n");
117#line 50 "test6.pgc"
118
120
121
122 printf(
"Test 3: deallocate all on disconnected connection\n");
124#line 55 "test6.pgc"
125
127
128
129 printf(
"Test 4: Use prepared statement from non-existent connection\n");
131#line 60 "test6.pgc"
132
133
134#line 61 "test6.pgc"
135
139#line 62 "test6.pgc"
140
142
143 printf(
"All tests completed !\n");
144
145 return 0;
146}
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 ECPGget_desc(int lineno, const char *desc_name, int index,...)
bool ECPGallocate_desc(int line, const char *name)
bool ECPGset_desc(int lineno, const char *desc_name, int index,...)
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)
bool ECPGdeallocate_all(int lineno, int compat, const char *connection_name)
char * ECPGprepared_statement(const char *connection_name, const char *name, int lineno)
bool ECPGprepare(int lineno, const char *connection_name, const bool questionmarks, const char *name, const char *variable)