1 //Close the connection and then call preparedStatement(). It should fail
4 public class ConnTest19
6 public static void main(String
[] args
)
10 Class
.forName("csql.jdbc.JdbcSqlDriver");
11 Connection con
= DriverManager
.getConnection("jdbc:csql", "root", "manager");
15 PreparedStatement pStmt
= null;
16 pStmt
= con
.prepareStatement("create table t1(f1 integer);");
20 System
.out
.println(e
.getMessage());
22 if (e
.getMessage().equals("Invalid state")) System
.exit(0);