I am getting the following error while trying to connect to MS-SQl server. I am
also enclosing the code. 151.209.33.3 represents the Database Server and 5000
the port number. The Servlet has been installed in the servlets directory of
Java Web Server, and the HTML is in public_html directory of Java Web Server. I
am using a JDBC driver which works perfectly fine

SQL Exception java.sql.SQLException: Can't open a socket on 151.209.33.3:5000.
Check host and port number and make sure the security manager allows this
connection.
 You can also try running the SocketApplet (java.net.ConnectException:
Connection refused).

(See attached file: NewMain.java)

Kindly help me.

Adarsh

NewMain.java

Reply via email to