adding test scripts
[csql.git] / test / jdbc / Gateway / ConnTest08.java
blob19965a214fdbc84ec743f5d5da62a2cb20b80c11
1 //Open the connection through jdbc:gateway and then call isClosed(). It should return false.
2 //Close the connection jdbc:gateway and then call isClosed(). It should return true.
4 import java.sql.*;
5 public class ConnTest08
7 public static void main(String[] args)
9 try
11 Class.forName("csql.jdbc.JdbcSqlDriver");
12 Connection con = DriverManager.getConnection("jdbc:gateway", "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);