Hi,
I am using Microsoft SQL Server 2000 Driver for JDBC to connect to SQL Sever 2000. It is just a test application whether its connect or not. But I got the following errors:
Error is:
javax.servlet.ServletException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
I installed the windows xp sp2, jdk5 and tomcat 4.I have already tried the all posibilities like Server Network Utility, Firewall and etc.
Here is my code:
<%@ page language="java" contentType="text/html" import="java.sql.*" %>
<%! Connection con; Statement st; ResultSet rs; %>
<%
try
{
Class.forName("com.microsoft.jdbc.sqlserver.SQLSer verDriver");
con=DriverManager.getConnection("jdbc:microsoft:sq lserver://localhost:1433;DatabaseName=VFS","sa","");
st=con.createStatement();
rs=st.executeQuery("select * from test");
while(rs.next())
{
out.println(rs.getString(1));
}
}
catch(Exception e)
{
out.println("Error -----> "+e);
}
%>
If anybody know the answer, please post ur suggestion.
Thanks in advance.
Thanks & Regards,
V. Prasath