Loading ...
Sorry, an error occurred while loading the content.
 

Firebird connection with java..

Expand Messages
  • rakesh4u60
    Hi, I have installed Firebird 2.1 on windows Xp and using firebirdsql.jdbc-2.1.6 driver to connect with java. Code:
    Message 1 of 2 , Aug 7, 2010
      Hi,

      I have installed Firebird 2.1 on windows Xp and using firebirdsql.jdbc-2.1.6 driver to connect with java.

      Code:

      Class.forName("org.firebirdsql.jdbc.FBDriver");

      connection = DriverManager.getConnection(
      "jdbc:firebirdsql://localhost/3050:C:\\firebird\\database\\TESTONEDB.GDB","test","test");
      I am getting following error:

      Caused by: org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544375.
      unavailable database
      Reason: unavailable database at
      org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:122) at
      org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:140) at
      java.sql.DriverManager.getConnection(DriverManager.java:525) at
      java.sql.DriverManager.getConnection(DriverManager.java:171)

      Please note that I am able to connect with ISQL and FlameRobin. My windows firewall is disabled. I tried to use fdb databases also but nothing is working.

      Please help, its really urgent for me.
    • Mark Rotteveel
      ... You are using the wrong url format; Jaybird has two distinct JDBC URL formats Either use: The old format: jdbc:firebirdsql: / :
      Message 2 of 2 , Aug 7, 2010
        On 7-8-2010 9:58, rakesh4u60 wrote:
        > Hi,
        >
        > I have installed Firebird 2.1 on windows Xp and using firebirdsql.jdbc-2.1.6 driver to connect with java.
        >
        > Code:
        >
        > Class.forName("org.firebirdsql.jdbc.FBDriver");
        >
        > connection = DriverManager.getConnection(
        > "jdbc:firebirdsql://localhost/3050:C:\\firebird\\database\\TESTONEDB.GDB","test","test");
        > I am getting following error:

        You are using the wrong url format; Jaybird has two distinct JDBC URL
        formats

        Either use:
        The old format:
        jdbc:firebirdsql:<hostname>/<port>:<path to db or alias>
        or the new format:
        jdbc:firebirdsql://<hostname>:<port>/<path to db or alias>

        The new format is more in line what other JDBC drivers use.

        --
        Mark Rotteveel
      Your message has been successfully submitted and would be delivered to recipients shortly.