1 /* 1. Connect to Target DB using connection string "jdbc:adapter".
3 * 2. Used correct UserName and Password.
4 * 3. Connect to the Target DB and Close the Connection
5 * 4. Again Connect and Close.
8 * Author : Jitendra Lenka
12 public class ConTest01
14 public static void main(String
[] args
)
18 Class
.forName("csql.jdbc.JdbcSqlDriver");
19 Connection con
= null;
20 con
=DriverManager
.getConnection("jdbc:adapter","root","manager");
23 System
.out
.println("Connect to Target DB");
27 System
.out
.println("Failed to Connect");
31 System
.out
.println("Connection Closed");
32 //-----------------------------
33 con
=DriverManager
.getConnection("jdbc:adapter","root","manager");
36 System
.out
.println("Again Connect to Target DB");
40 System
.out
.println("Failed to Connect to Target DB");
44 System
.out
.println("Connection Closed");
47 System
.out
.println("Exception in Test: " +e
);