[Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.--help

Hi,

I am going crazy with this error from past two days..

I am new to JSP and SQL Server 2000.

I am trying to develop a small web application using JSP, TOMCAT 5.0, HTML and SQL SERVER 2000.

My code goes like this:

<html>

<body>

<table>

<tr>

<td>

<jsp:include page="menu.html"/>

</td>

<%-- Set the scripting language to java and --%>

<%-- import the java.sql package --%>

<%@ page language="java" import="java.sql.*" %>

<%

try

{

//Load SQL server Drvier class file

Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");

//Make a connection to the oracle datasource

Connection conn = DriverManager.getConnection("jdbc:microsoft:sqlserver://SPL5W157B:1433;", "kavuri", "mangini_09");

%>

<%

// Create the statement

Statement statement = conn.createStatement();

//Use the statement to SELECT the student attribute FROM the student table

ResultSet rs = statement.executeQuery("SELECT * FROM Student");

%>

<table>

<tr>

<th>SSN</th>

<th>First</th>

<th>Last</th>

<th>College</th>

</tr>

<%

//Iterate over the ResultSet

while(rs.next())

{

%>

<tr>

<%-- Get the SSN, which is a number --%>

<td><%=rs.getInt("SSN") %></td>

<%--Get the FirstName --%>

<td><%= rs.getString("FIRSTNAME") %></td>

<%--Get the LastName --%>

<td><%= rs.getString("LASTNAME") %></td>

<%--Get the College --%>

<td><%= rs.getString("COLLEGE") %></td>

</tr>

<%

}

%>

</table>

<%

//Close the Result Set

rs.close();

//Close the Statement

statement.close();

}

catch(SQLException sqle)

{

out.println(sqle.getMessage());

}

%>

</td>

</tr>

</table>

</body>

</html>

When I am trying to run this JSP file in TOMCAT 5.0 i get this error message:

[Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.

I checked if TCP/IP port is enabled or not..its enabled and also the port no: 1433

and I am using the same port number.

and I also changed the authentication for login into mixed mode ie, windows and sql server authentication...

but i still get the error message..

CAN ANYONE HELP ME PLEASE...

Thanks & Regards

Lavanya

[2789 byte] By [lavanya_299a] at [2007-11-27 1:56:30]
# 1
Please don't crosspost. Proceed here: http://forum.java.sun.com/thread.jspa?threadID=5163796&messageID=9625609#9625609
BalusCa at 2007-7-12 1:30:57 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...