none
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Connection reset

    Question

  • Hi everyone, I hope you could help me:

    I´m trying to access my database, working with JBuilder 7 and MySql. I have the following code:

    public Conexion() throws Exception {

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

    //The error is in this statement
          Connection con = DriverManager.getConnection("jdbc:microsoftTongue Tiedqlserver://localhost:3306;DatabaseName=gescom;user=root;password=gestion");

          if (con != null) {
          System.out.println();
          System.out.println("Successfully connected");
          System.out.println();
         
    }

    I print here the error trace:

    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Connection reset
        at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
        at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
        at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
        at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)
        at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source)
        at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown Source)
        at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
        at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
        at java.sql.DriverManager.getConnection(DriverManager.java:525)
        at java.sql.DriverManager.getConnection(DriverManager.java:193)
        at gescom.Conexion.<init>(Conexion.java:22)
        at gescom.gestion_comercio.main(gestion_comercio.java:59)


    Thank you.... your friend and neighbour superTony....dioldiol
    Thursday, August 07, 2008 12:34 PM

Answers

  • Hi Tony,

     

    Are you trying to connect to Microsoft SQL Server 2000 or MySql?

    From the exception message you posted, you are using a Microsoft SQL Server 2000 driver.  I would be surprised if the same driver will work with MySql.

     

    If you are trying to connection to SQL Server, which version of SQL Server are you trying to connect to?

    If you are trying to connect to SQL Server 2005, I recommend that you try the Microsoft SQL Server 2005 JDBC driver v1.2 that is available at http://msdn.microsoft.com/data/jdbc

     

    HTH,

    Jimmy

     

    Thursday, August 07, 2008 11:31 PM
    Moderator

All replies

  • Hi Tony,

     

    Are you trying to connect to Microsoft SQL Server 2000 or MySql?

    From the exception message you posted, you are using a Microsoft SQL Server 2000 driver.  I would be surprised if the same driver will work with MySql.

     

    If you are trying to connection to SQL Server, which version of SQL Server are you trying to connect to?

    If you are trying to connect to SQL Server 2005, I recommend that you try the Microsoft SQL Server 2005 JDBC driver v1.2 that is available at http://msdn.microsoft.com/data/jdbc

     

    HTH,

    Jimmy

     

    Thursday, August 07, 2008 11:31 PM
    Moderator
  • hello jimmy
    I was trying to connect to MySql, and I was using the wrong driver, puffffffff!!!!

    you was very helpful, thank you.


    Monday, August 18, 2008 11:53 AM
  • hi Jimmy ,

    i am also facing the same issue.Please see this below,

    java.sql.SQLEXCEPTION :[microsoft][sqlserver 2000 driver forJDBC] connection reset"

         while executing

    "$pstmt executeQuery "SELECT InstallReqID FROM STAutorequest where ID='$iReqID'"

          (procedure "GetInstallID" line4)

           invoked from within

    "GetInstallID $iReqID"

         (procedure "CreateEmailReport" line26)

    and we are using MS SQL 2005..please help me on this urgently

    Thursday, January 10, 2013 10:12 AM
  • Any solution for this issue ?Am also facing same problem .Am using simple stored procedure and SQL Server 10.50.2500

    .Appreciate help on this ?

    Tuesday, April 25, 2017 2:47 PM
  • Any solution for this issue ?Am also facing same problem .Am using simple stored procedure and SQL Server 10.50.2500

    I don't know about this issue, but you are not using SQLServer 2000 Driver for JDBC, but something newer I hope?

    What I would like to point out though, is that you are running SP1 for SQL 2008 R2, whicih is largely outdated. Install SP3 which is the last service pack for SQL 2008 R2. I cannot promise that it will help you with the problem you are seeing, but it is definitely the place to start. SP1 is very outdated.

    Tuesday, April 25, 2017 9:11 PM
  • It is working for me in my windows machine the program and getting results fine .But the same class file when am running from unix server ,getting this Error .

    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Connection reset
            at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
            at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
            at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
            at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)
            at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknown Source)
            at com.microsoft.jdbc.base.BaseStatement.commonTransitionToState(Unknown Source)
            at com.microsoft.jdbc.base.BaseStatement.postImplExecute(Unknown Source)
            at com.microsoft.jdbc.base.BasePreparedStatement.postImplExecute(Unknown Source)
            at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)
            at com.microsoft.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source)
            at com.microsoft.jdbc.base.BasePreparedStatement.executeQuery(Unknown Source)

    Regards,

    Brahmaiah

    Wednesday, May 03, 2017 10:18 PM