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