*** empty log message ***
[csql.git] / test / sqlnetwork / Jdbcnetwork / ConnTest20.java
blobd4a677a3c9e1d1ceca85c01753bbf183701ce895
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 import java.sql.*;
4 public class ConnTest20
6 public static void main(String[] args)
8 try
10 Class.forName("csql.jdbc.JdbcSqlDriver");
11 Connection con = DriverManager.getConnection("jdbc:csql://localhost:5678/csql", "root", "manager");
12 if ( con == null )
13 System.exit(1);
14 if(con.isClosed()) System.exit(1);
15 con.close();
16 if(!con.isClosed()) System.exit(1);
17 }catch(Exception e) {
18 System.out.println(e.getMessage());
19 e.getStackTrace();
20 System.exit(1);