adding test scripts
[csql.git] / test / jdbc / network / Connection / ConnTest19.java
blob20a8dd9d7fa9424b035d16b7270b9748cf3607ae
1 //Close the connection and then call preparedStatement(). It should fail
2 import java.sql.*;
3 public class ConnTest19
5 public static void main(String[] args)
7 try
9 Class.forName("csql.jdbc.JdbcSqlDriver");
10 Connection con = DriverManager.getConnection("jdbc:csql://localhost:5678", "root", "manager");
11 if ( con == null )
12 System.exit(1);
13 con.close();
14 PreparedStatement pStmt = null;
15 pStmt = con.prepareStatement("create table t1(f1 integer);");
16 if (pStmt != null)
17 System.exit(1);
18 }catch(Exception e) {
19 System.out.println(e.getMessage());
20 e.getStackTrace();
21 if (e.getMessage().equals("Invalid state")) System.exit(0);
22 else System.exit(1);