• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem in making connectivity with SQLServerDriver

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am try to get around following error [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket while making JDBC connection with SQL Server 2000 service pack 3.

I am using Microsoft Windows Server 2003 Enterprise Edition service pack 2.

I installed SQL Server 2000 SP 2 and applied SP3 from microsoft site.I also

downloaded MIcrosoft SQL Server Drivers for SP3 from microsoft site.

There is no problem with SQL Server , i am able to run queries in Query Analyser.

Even I checked following support from Microsoft http://support.microsoft.com/kb/313100, but it does not help me much.

I make ensure that TCP/IP is enabled on port 1433 by checking server instance properies and using mixed mode authentication also.

I also make sure that my windows built in firewall is turned off.

I am using Tomcat 5 , added above drivers(jar files) in Tomcat classpath , i.e in WEB-INF/lib of my web application.

here is my connection bean code

package com;

import java.sql.*;
import java.io.*;
import java.lang.*;

public class sqlAccessBean
{

String dbURL = "jdbc:microsoft:sqlserver://localhost:1433;databaseName=master;";
String dbDriver = "com.microsoft.jdbc.sqlserver.SQLServerDriver";
String username;
String password;
public Connection dbCon;

public sqlAccessBean()
{
super();
}

public boolean connect(String module) throws ClassNotFoundException,SQLException
{
Class.forName(dbDriver);
dbCon = DriverManager.getConnection(dbURL,"sa","sa");
return true;
}
}

I am using above bean in my jsp and calling connect() method .

I am beginner with SQL Server connectivity, can anybody help me?

Thanks you a lot, waiting for your reply.

Regards,

Mandar S. Velankar
 
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sounds like a connection issue, either your connection string is incorrect or there's a firewall/port issue blocking the connection.
 
A tiny monkey bit me and I got tiny ads:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic