adding test scripts
[csql.git] / test / jdbc / Connection / ConnTest18.java
blobe544527037a0a7c30061d787d90748e4ab969de1
1 //Close the connection and then call createStatement(). It should fail.
2 //Author: XieLiang
3 import java.sql.*;
4 public class ConnTest18
6 public static void main(String[] args)
8 try
10 Class.forName("csql.jdbc.JdbcSqlDriver");
11 Connection con = DriverManager.getConnection("jdbc:csql", "root", "manager");
12 if ( con == null )
13 System.exit(1);
14 con.close();
15 Statement cStmt = con.createStatement();
16 if (cStmt != 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);