Results 1 to 3 of 3
  1. #1
    kolonaki is offline Member
    Join Date
    Apr 2010
    Posts
    2
    Rep Power
    0

    Default Ireport: connection to SQL server refused

    Hello there.

    I am new at Java and especially ireport. I am running 3.7.1 version and I am trying to create a connection to a SQL server.

    I downloaded the most recent driver, so in the JDBC Driver field I pass "MS SQLServer (net.sourceforge.jtds.jdbc.Driver)". In the JDBC URL field, which by default it is "jdbc:jtds:sqlserver://localhost/DATABASE", I change it to "jdbc:jtds:sqlserver://MY_SERVER'S_NAME/MY_DATABASE'S_NAME", I enter the right username and password but I get the error: "SQL problems: Network error IOException: Connection refused: connect".

    What should I do?

    Thank you in advance.

  2. #2
    iluxa is offline Senior Member
    Join Date
    Mar 2010
    Posts
    266
    Rep Power
    5

    Default

    check that
    - server name is correct
    - port number is correct (you should be using jdbc:jtds:sqlserver://SERVER:PORT/DATABASE)
    - server is configured to accept TCP/IP connections
    - there isn't a firewall blocking connections

  3. #3
    kolonaki is offline Member
    Join Date
    Apr 2010
    Posts
    2
    Rep Power
    0

    Default

    I also use .NET for some other applications, so when I connect to the same database through .NET, I have no problems. So, no firewall blocks my connection and my server is configured to accept TCP/IP connections.

    My database is in the folder SERVER_NAME/SOME_FOLDER/DATABASE_NAME

    When I run Microsoft SQL Server Management Studio Express, I see that path for my database.

    I tried "jdbc:jtds:sqlserver://SERVER_NAME/SOME_FOLDER:1344/DATABASE_NAME", "jdbc:jtds:sqlserver://SERVER_NAME:1344/SOME_FOLDER/DATABASE_NAME" but had the same message as above.

    Now what? :-(
    Last edited by kolonaki; 04-14-2010 at 06:16 PM.

Similar Threads

  1. Replies: 0
    Last Post: 03-30-2009, 01:34 AM
  2. Replies: 3
    Last Post: 01-26-2009, 06:30 PM
  3. Replies: 2
    Last Post: 11-21-2008, 09:36 PM
  4. Replies: 1
    Last Post: 12-17-2007, 12:13 PM
  5. java.net.ConnectException: Connection refused
    By Albert in forum Advanced Java
    Replies: 2
    Last Post: 07-03-2007, 05:49 PM

Posting Permissions

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