1 /* prepare,execute,prepare....,
2 * second prepare should pass.
4 * Author : Jitendra Lenka
7 #include<AbsSqlStatement.h>
13 AbsSqlConnection
*con
= SqlFactory :: createConnection(CSqlAdapter
);
14 rv
= con
->connect("root","manager");
17 AbsSqlStatement
*stmt
= SqlFactory :: createStatement(CSqlAdapter
);
18 stmt
->setConnection(con
);
21 strcpy(statement
,"CREATE TABLE T1(F1 INT,F2 CHAR(20));");
24 rv
= stmt
->prepare(statement
);
31 printf("Prepared the statement\n");
33 rv
= stmt
->execute(rows
);
40 printf("Execute the statement\n");
45 strcpy(statement
,"DROP TABLE T1;");
46 rv
= stmt
->prepare(statement
);
49 printf("Test script failed\n");
52 printf("Test script passed\n");