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