File Removed
[csql.git] / test / sqlnetwork / Jdbcnetwork / ConnTest19.java
blobdd2b2b6834bc858fde9d535cabd55908ee74be9e
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/csql", "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);