12 Replies Latest reply on Sep 19, 2005 7:17 AM by saeedy

    can not cooect to sqlserver on windows xp or 2003

    saeedy

      hi
      in my application i use datasource coneection to coonect to sqlserver.
      i can only connect to sql server that running on windows 2000
      but when i want cooncet to sqlserver that running on window xp or 2003
      i take exception i use jtds driver and jboss with j2sdk1.4.1_05 , pesonal sqlserver
      this is my datasource code
      //------------------
      <?xml version="1.0" encoding="UTF-8"?>


      <local-tx-datasource>
      <jndi-name>Onlline-HISDS</jndi-name>
      <connection-url>jdbc:jtds:sqlserver://192.168.1.1:1433/hsp;user=sa;password=</connection-url>
      <driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class>
      <user-name>sa</user-name>

      <min-pool-size>50</min-pool-size>
      <max-pool-size>200</max-pool-size>
      <idle-timeout-minutes>0</idle-timeout-minutes>
      </local-tx-datasource>


      //------------

      my connection code is

      InitialContext ic = new InitialContext();

      DataSource dc = (DataSource) ic.lookup("java:/Onlline-HISDS");
      connection = dc.getConnection();
      and exception occured on getConnection();
      please help me

      this is my exception

      Could not create connection; - nested throwable: (java.sql.SQLException: Connection refused: connect); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Connection refused: connect))
      org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (java.sql.SQLException: Connection refused: connect); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Connection refused: connect))

      thanks