I tried different code by setting the creating default DSN
---------------------------
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
System.out.println("# - Driver Loaded");
Connection con = DriverManager.getConnection("jdbc:odbc:login_DSN");
System.out.println("# - Drivermanager Loaded");
Statement s = con.createStatement();
-------------------------------
But i got this error
--------------------------------------
# - Driver Loaded
Error : java.sql.SQLException: [Microsoft][ODBC SQL Server Driver][DBNETLIB]General network error. Check your network documentation.
[quote:2bzyi4b4]General network error. Check your network documentation[/quote:2bzyi4b4]
its giving a network error the problem is not with the code but the network.