1 /* close the connection and call prepare ,it should fail
3 * Author : Jitendra Lenka
5 #include<SqlNwConnection.h>
6 #include<SqlNwStatement.h>
12 AbsSqlConnection
*con
= new SqlNwConnection();
13 con
->setInnerConnection(NULL
);
14 SqlNwConnection
*conn
= (SqlNwConnection
*)con
;
15 conn
->setHost("localhost", 5678);
16 rv
= con
->connect("root","manager");
18 printf("Connection opened\n");
20 AbsSqlStatement
*stmt
= new SqlNwStatement();
21 stmt
->setInnerStatement(NULL
);
22 stmt
->setConnection(con
);
24 strcpy(statement
,"CREATE TABLE T1(F1 INT);");
27 rv
= con
->disconnect();
29 printf("Connection closed\n");
31 rv
= stmt
->prepare(statement
);
37 printf("Test script failed\n");
40 printf("Test script passed\n");