Microsoft SQL Server 2005 Connection Problem
The SQL server was installed in the PC and the JDBC driver jar file was installed also. But when I try to connect to the database, an error is encountered. The error message:
"com.microsoft.sqlserver.jdbc.SQLServerExcepti on: The TCP/IP connection to the host failed".
The 2 basic line of codes:
class.forname("com.microsoft.sqlserver.jdbc.SQLSer verDriver");
Connection con = DriverManager.getConnection( "jdbc:sqlserver://localhost;user=username;passwrod=password);
(as suggested by Microsoft docmention. Please know also the database name added to the Connection statement still does not make any different neither the port 1433.)
I am able to ping localhost (or ping 127.0.0.1) and TCP/IP is enable within the server, etc. Even setup exception port 1433 on firewall! Just don't know what else I can check or something I forget to setup?
Please help and thanks in advance for your help.
Best,
Don't Know Much
|