Hi,
I have installed MS SQL 2005 Evaluation version(downloaded from microsoft site) on my win2k3 Enterprise Edition I am writing a
java application that connects to MS SQL 2005.
I have downloaded the MS SQL 2005
JDBC driver. And i unjarred the
I have unjarred the sqljdbc.jar file and kept the com folder and my .java file in the same folder.
When i am trying to connect, I am getting the following error:
-------------
com.microsoft.sqlserver.jdbc.SQLServerException: Failed Logon:com.microsoft.sqlserver.jdbc.SQLServerException: TCP/IP connection failed to host:155.35.54.160 java.net.ConnectException: Connection refused:connect
-------------
My code look like this:
---------------------------------------
try {
Class.forName ("com.microsoft.sqlserver.jdbc.SQLServerDriver");
String fs = File.separator;
String conn_str = "jdbc:sqlserver://155.35.54.160:1433;user=sa;password=SA;databaseName=asdb";
conn = DriverManager.getConnection ( conn_str );
}
catch (Exception e) {System.out.println(e); }
Please reply.