Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can i fix the following error

 
john mattucci
Ranch Hand
Posts: 331
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Graham Thorpe
Ranch Hand
Posts: 265
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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?
 
Monty Ireland
Ranch Hand
Posts: 161
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. re-order the drivers in your classpath.
2. stop using microsoft provided drivers
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic