33{
34/* exec sql begin declare section */
35
36
37
38#line 17 "test2.pgc"
39 char id [ 200 ] ;
40
41#line 18 "test2.pgc"
42 char res [ 200 ] ;
43/* exec sql end declare section */
44#line 19 "test2.pgc"
45
46
48
49 strcpy(id, "first");
50 {
ECPGconnect(__LINE__, 0,
"ecpg2_regression" , NULL, NULL ,
id, 0); }
51#line 24 "test2.pgc"
52
53 {
ECPGconnect(__LINE__, 0,
"ecpg1_regression" , NULL, NULL ,
"second", 0); }
54#line 25 "test2.pgc"
55
56
57 /* this selects from "second" which was opened last */
59 ECPGt_char,(res),(
long)200,(
long)1,(200)*
sizeof(
char),
61#line 28 "test2.pgc"
62
64 ECPGt_char,(res),(
long)200,(
long)1,(200)*
sizeof(
char),
66#line 29 "test2.pgc"
67
69 ECPGt_char,(res),(
long)200,(
long)1,(200)*
sizeof(
char),
71#line 30 "test2.pgc"
72
73
75#line 32 "test2.pgc"
76
78 ECPGt_char,(res),(
long)200,(
long)1,(200)*
sizeof(
char),
80#line 33 "test2.pgc"
81
82
83 /* this will disconnect from "first" */
85#line 36 "test2.pgc"
86
88 ECPGt_char,(res),(
long)200,(
long)1,(200)*
sizeof(
char),
90#line 37 "test2.pgc"
91
92
93 /* error here since "first" is already disconnected */
95#line 40 "test2.pgc"
96
97
98 /* disconnect from "second" */
100#line 43 "test2.pgc"
101
102
103 return 0;
104}
bool ECPGsetconn(int lineno, const char *connection_name)
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,...)