memory leak fixes
[csql.git] / test / sqlapi / Connect / conntest6.c
blobe58458b6b4a3689243e1c4695f5a3124c48c9511
1 /* connect twice without closing the connection,
2 * second conection should return "user already logged in".
4 * Author : Jitendra lenka
5 */
7 #include<AbsSqlStatement.h>
8 #include<SqlFactory.h>
9 int main()
11 DbRetVal rv = OK;
12 AbsSqlConnection *con = SqlFactory::createConnection(CSql);
13 rv = con->connect("root","manager");
14 if(rv !=OK)return 1;
15 printf("Connection opened\n");
17 rv = con->connect("root","manager");
18 if(rv==OK)
20 printf("testscript failed\n");
21 return 1;
23 printf("Test script passed\n");
24 delete con;
25 return 0;