memory leak fixes
[csql.git] / test / sqlapi / Connect / conntest1.c
blob93b66d9a0a8a859acb9d51ea8b7a21c531e76c74
1 /* connect ,disconnect and again connect ,it should pass.
3 * AUTHOR : Jitendra Lenka
4 */
7 #include<AbsSqlStatement.h>
8 #include<SqlFactory.h>
10 int main()
12 DbRetVal rv =OK;
13 AbsSqlConnection *con = SqlFactory :: createConnection(CSql);
14 rv = con->connect("root","manager");
15 if(rv!=OK)return 1;
16 printf("aConnection opened\n");
17 delete con;
19 con = SqlFactory::createConnection(CSql);
20 rv = con->connect("root","manager");
21 if(rv !=OK)
23 printf("Test script failed \n");
24 return 2;
26 printf("Connection closed\n");
27 printf("Test script passed\n");
28 delete con;
29 return 0;