1 /* 1. Connect to Target DB using connection string "jdbc:adapter://localhost:5678".
3 * 2. Used correct UserName and Password.
4 * 3. Connect to the Target DB and Close the Connection
5 * 4. Again Connect and Close.
10 public class ConTest01
12 public static void main(String
[] args
)
16 Class
.forName("csql.jdbc.JdbcSqlDriver");
17 Connection con
= null;
18 con
=DriverManager
.getConnection("jdbc:adapter://localhost:5678","root","manager");
21 System
.out
.println("Connect to Target DB");
25 System
.out
.println("Failed to Connect");
29 System
.out
.println("Connection Closed");
30 //-----------------------------
31 con
=DriverManager
.getConnection("jdbc:adapter","root","manager");
34 System
.out
.println("Again Connect to Target DB");
38 System
.out
.println("Failed to Connect to Target DB");
42 System
.out
.println("Connection Closed");
45 System
.out
.println("Exception in Test: " +e
);