Results 1 to 5 of 5
  1. #1
    Levian is offline Senior Member
    Join Date
    Jun 2011
    Posts
    109
    Rep Power
    0

    Default Connection problem

    I get this error when I migrate the database to the real database server and change the ip part of the code

    Sep 12, 2011 8:25:03 AM com.microsoft.sqlserver.jdbc.SQLServerConnection Prelogin
    WARNING: ConnectionID:1 Prelogin error: host xxx.xxx.xxx.xxx port 1433 Unexpected end of prelogin response after 0 bytes read

    And this is the code part for the connection :
    Java Code:
    	      Connection con = DriverManager.getConnection("jdbc:sqlserver://xxx.xxx.xxx.xxx:1433;"
    					+ "user=sa;"
    					+ "password=xxxxx;" 
    					+ "databaseName=xxxxx"
    Another thing is the test database server I was using is SQL 2000 while the real one is SQL 7.
    Anyone know what the problem here ?

    Added : currently I'm using sqljdbc4.jar for this.

    Thanks in advance,
    Last edited by Levian; 09-12-2011 at 04:48 AM.
    First is to make something usable, next is to aim for perfection which means a never ending improvements.

  2. #2
    Levian is offline Senior Member
    Join Date
    Jun 2011
    Posts
    109
    Rep Power
    0

    Default Re: Connection problem

    It seems the problem is the connection to SQL 7, is there anyone who knows what connector that can be used for SQL 7 ?


    Thanks in advance,
    First is to make something usable, next is to aim for perfection which means a never ending improvements.

  3. #3
    Levian is offline Senior Member
    Join Date
    Jun 2011
    Posts
    109
    Rep Power
    0

    Default Re: Connection problem

    Problem solved by using jTDS instead of sqljdbc4


    Thanks,
    First is to make something usable, next is to aim for perfection which means a never ending improvements.

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,097
    Rep Power
    20

    Default Re: Connection problem

    I expect Microsoft have a newer connector as well.
    When moving from one server version to a newer one it is generally best to get the latest version.

    One of the problems with testing on an earlier platform than your target.

  5. #5
    Levian is offline Senior Member
    Join Date
    Jun 2011
    Posts
    109
    Rep Power
    0

    Default Re: Connection problem

    Well, problem was solved with jTDS. I have no idea on microsoft version for the connector, I didn't really look into it for some reasons.
    First is to make something usable, next is to aim for perfection which means a never ending improvements.

Similar Threads

  1. Connection problem
    By mcajavaprogramer in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 09-16-2010, 01:58 PM
  2. dbcp connection problem
    By sandeepsai39 in forum New To Java
    Replies: 3
    Last Post: 09-03-2010, 01:59 PM
  3. URL connection problem
    By rajeshgubba in forum New To Java
    Replies: 8
    Last Post: 04-23-2009, 06:22 PM
  4. Too many Connection Problem Plz Help
    By shuvra_pan in forum Advanced Java
    Replies: 3
    Last Post: 03-17-2009, 01:42 PM
  5. connection problem
    By subash in forum JDBC
    Replies: 5
    Last Post: 04-22-2008, 09:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •