adding test scripts
[csql.git] / test / jdbc / network / Gateway / ConnTest07.java
blobe68e571fd7be313f9574d21b2a79fa048c4f0468
1 //Try to open through jdbc:gateway://localhost:5678 connection , close , then open through jdbc:csql . it should pass
3 import java.sql.*;
4 public class ConnTest07
6 public static void main(String[] args)
8 try
10 Class.forName("csql.jdbc.JdbcSqlDriver");
11 Connection con = DriverManager.getConnection("jdbc:gateway://localhost:5678", "root", "manager");
12 if ( con == null )
13 System.exit(1);
14 con.close();
15 con = DriverManager.getConnection("jdbc:csql","root","manager");
16 if ( con == null )
17 System.exit(1);
18 con.close();
19 System.exit(0);
20 }catch(Exception e) {
21 System.out.println(e.getMessage());
22 e.getStackTrace();
23 System.exit(1);