adding test scripts
[csql.git] / test / jdbc / Connection / ConnTest20.java
blobd00f5adde9d959abf253a0d466c09ed04a2b2a6a
1 //Open the connection and then call isClosed(). It should return false.
2 //Close the connection and then call isClosed(). It should return true.
3 //Author: XieLiang
4 import java.sql.*;
5 public class ConnTest20
7 public static void main(String[] args)
9 try
11 Class.forName("csql.jdbc.JdbcSqlDriver");
12 Connection con = DriverManager.getConnection("jdbc:csql", "root", "manager");
13 if ( con == null )
14 System.exit(1);
15 if(con.isClosed()) System.exit(1);
16 con.close();
17 if(!con.isClosed()) System.exit(1);
18 }catch(Exception e) {
19 System.out.println(e.getMessage());
20 e.getStackTrace();
21 System.exit(1);