• 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

How can i fix the following error

 
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I get the following error:
SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
I have included the driver jar files in the classpath. How can i fix this?
Thank u all for your time
 
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i think ur port is not connected ur pc .I mean sqlserver port .Pls check the port number whethere it is working or not using scoket program
import java.io.*;
public class pp {
public static void main(String jj[]) {
try {
java.net.Socket sock1 = new java.net.Socket("vasu",1433);
// here vasu is the pc name
// 1433 is the driver port for sqlserver using datadirect
System.out.println(sock2);
sock1.close();
} catch (Exception ex) {
ex.printStackTrace();}
}
}
 
john mattucci
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
prior to this one ie sql2000 type 4 driver; I used another type 4 driver and I had no problems. I have seen other people have the same problem with the microsoft driver. Any suggestions?
 
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. re-order the drivers in your classpath.
2. stop using microsoft provided drivers
 
What are you doing? You are supposed to be reading this tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic