2 close the connection and call execute,it should fail.
10 AbsSqlConnection
*con
= createConnection();
11 rv
= con
->connect("root","manager");
16 printf("Connection opened\n");
18 AbsSqlStatement
*stmt
= createStatement();
19 stmt
->setConnection(con
);
21 strcpy(statement
,"CREATE TABLE T1(F1 INT,F2 CHAR(20)); ");
23 rv
= stmt
->prepare(statement
);
30 printf("prepared successfully\n");
32 rv
= con
->disconnect();
37 printf("Disconnect successfully\n");
39 rv
= stmt
->execute(rows
);
41 printf("Test script failed \n");
42 delete stmt
; return 4;
44 printf("Execute failed after closing Connection\n");
46 printf("Test script passed\n");
47 delete stmt
; delete con
;