1 Reply Latest reply on Sep 27, 2011 8:00 AM by GaryEdwards

    Trying to connect via JDBC and getting errors

    GaryEdwards

      Title

      Trying to connect via JDBC and getting errors

      Post

      Hello

      I am trying to establish a JDBC connection with the code below, however I get;

      java.sql.SQLException: [DataDirect][SequeLink JDBC Driver][SequeLink Server]Authorisation failure.

      Or this if I use

      java.sql.SQLException: [DataDirect][SequeLink JDBC Driver]TCP/IP error, connection refused.

      The JDBCTest program says the driver is registered.

      Why am I getting a refused connection?

      TIA

      Gary

      import java.sql.*;

      public class Connect {

      public static void main(String[] args) {

      String databaseDriver = "com.ddtek.jdbc.sequelink.SequeLinkDriver";
      String databaseURL = "jdbc:sequelink://10.10.1.200:2399;user=gary;password=molly;serverDatabaseSource=Dispatch";
      Connection databaseConnection = null;

      try {
      Class.forName(databaseDriver).newInstance();
      databaseConnection = DriverManager.getConnection(databaseURL);

      } catch (Exception e) {
      System.out.println(e);
      }
      }
      }