I am unable to connect to sql server, getting following error.
exception com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection
to the host SSALES, port 1433 has failed. Error: "The driver received an unexpe
cted pre-login response. Verify the connection properties and check that an inst
ance of SQL Server is running on the host and accepting TCP/IP connections at th
e port. This driver can be used only with SQL Server 2000 or later.".
**my local Environment:-**
java 5,
sql server enterprise manager version 8,
OS- window server 2003
**RunApp.java**
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
conn = java.sql.DriverManager.getConnection("jdbc:sqlserver://abc;databaseName={db};user=name;password=passworf;");
Statement stmt=conn.createStatement();
ResultSet rs=stmt.executeQuery("SELECT * FROM testdb.testtabel where active = 'a'");
**running through cmd:**
set path="C:\Program Files\Java\jdk5\bin";
javac -classpath "D:\Web Development\ABC\lib\mail-1.4.3.jar;D:\Web Development\ABC\lib\sqljdbc.jar;" com\test\RunApp.java
java -classpath "D:\Web Development\ABC\lib\mail-1.4.3.jar;D:\Web Development\ABC\lib\sqljdbc.jar;" com.test.RunApp