Subject Re: [Firebird-Java] Re: JDBC driver for Firebird 2.5
Author Mark Rotteveel
On 1-1-2011 21:18, shantanu_k06 wrote:
> I have this curious issue connecting to FB 2.5 on 32-bit Windows 7 using the JDBC driver 2.1.6 (on Sun JDK 1.6.23) from Maven repo.
> The connection works when I use the following JDBC URL:
> jdbc:firebirdsql://localhost/D:/temp/bituf.gdb
> The connection fails when I use the one below:
> jdbc:firebirdsql:D:/temp/bituf.gdb
> The error I get is this:
> GDS Exception. 335544721. Unable to complete network request to host "D".
> What am I missing/doing wrong? Is it compulsory to provide host[:port] in the URL? The FAQ doesn't seem to say so:

AFAIK, contrary to what the FAQ states, you will need to include the
hostname in the URL if you want to connect using the Type 4 driver (full
java driver), which is the default if you use jdbc:firebirdsql with
specifying the driver type.

I believe that if you connect using the Type 2 driver (native or
embedded) then you will not need to specify the hostname.

If you really want to use the native driver, then you need to load the
DLL into Java, and you can use jdbc:firebirdsql:native:(rest of the JDBC
URL) or jdbc:firebirdsql:embedded:(rest of the JDBC URL)

> However in the entire FAQ there isn't a single example that doesn't provide the "host" information in the URL.

As far as I can see the FAQ is incorrect at this point as the Type 4
driver is the default and does require a hostname.
Mark Rotteveel