1 //Close the connection and call execute,it should be failed.
7 AbsSqlConnection
*con
= createConnection();
8 rv
= con
->connect("root","manager");
10 printf("Connection opened\n");
12 AbsSqlStatement
*stmt
= createStatement();
13 stmt
->setConnection(con
);
15 strcpy(statement
,"CREATE TABLE t1(f1 INT,f2 CHAR(20)); ");
16 if(strcmp(getenv("DSN"),"db2")==0){
17 strcpy(statement
,"CREATE TABLE t1(f1 INT,f2 CHAR(20))");
20 rv
= stmt
->prepare(statement
);
27 printf("prepared successfully\n");
29 rv
= con
->disconnect();
32 printf("Disconnect successfully\n");
34 rv
= stmt
->execute(rows
);
37 printf("Test script failed \n");
42 printf("Test script passed\n");