varchar does not support tree index
[csql.git] / test / sqlapi / Csql / Connect / conntest1.c
blobc3145c9d724d196130146f74254f64433e834d2d
1 /* connect ,disconnect and again connect ,it should pass.
2 */
3 #include "common.h"
5 int main()
7 DbRetVal rv =OK;
8 AbsSqlConnection *con = createConnection();
9 // Connection 1st time
10 rv = con->connect("root","manager");
11 if(rv!=OK)return 1;
12 printf("Connection Opened\n");
13 rv = con->disconnect();
14 if(rv!=OK)return 2;
15 printf("Connection Closed\n");
16 // Connecting 2nd time
17 con = createConnection();
18 rv = con->connect("root","manager");
19 if(rv!=OK) {
20 printf("Test script failed \n");
21 return 3;
23 printf("Connection Opened\n");
24 con->disconnect();
25 printf("Connection closed\n");
26 printf("Test script passed\n");
27 delete con;
28 return 0;