adding test scripts
[csql.git] / test / sqlapi / Connect / conntest2.c
blob00ee48c19b52b6f8b7e9312fa59ebf519621c71a
1 /* close the connection and call commit, it should fail
3 * Author : Jitendra Lenka
4 */
6 #include"common.h"
8 int main()
10 DbRetVal rv = OK;
11 AbsSqlConnection *con = createConnection();
12 rv = con->connect("root","manager");
13 if(rv!=OK)return 1;
14 printf("Connection opened\n");
15 rv = con->beginTrans();
16 if(rv!=OK)return 2;
17 rv = con->disconnect();
18 if(rv !=OK)return 3;printf("Connection closed\n");
19 rv = con->commit();
20 if(rv==OK) {
21 printf("Test script failed\n");
22 return 4;
24 printf("After closing the connection, commit failed\n");
25 printf("Test script pased\n");
26 delete con;
27 return 0;