Subject | Re: Java ODBC related problem |
---|---|
Author | Alejandro |
Post date | 2004-08-04T08:52:40Z |
--- In firebird-support@yahoogroups.com, "Alejandro" <amosteo@u...>
wrote:
I don't know why the stand-alone version worked and the servlet not,
but I've found the solution in PHP and ASP groups where other people
had the same problem:
You have to prefix the path to the database with <server>: in the ODBC
source, even for local connections.
For example:
127.0.0.1:c:/blah/blah.fdb
wrote:
> Hi,connection,
>
> I'm trying to do some queries to a firebird database (windowsxp, fb
> 1.5.1). I've configured the ODBC source and it tests OK, I can
> connect from a variety of ODBC clients and it works okay.
>
> I've written a simple java test program and it also works ok.
> However, when I try to connect from a servlet I get:
>
> java.sql.SQLException: unavailable database
>
> I'm not using connection pools or anything, just a direct
> established the same way that in the java test program which works.this
> Furthermore, the same servlet connects ok to another ODBC database
> (not firebird but access).
>
> Any ideas why this can happen? I've seen an old usenet post with
> problem in firebird but without answers.Just for the record.
I don't know why the stand-alone version worked and the servlet not,
but I've found the solution in PHP and ASP groups where other people
had the same problem:
You have to prefix the path to the database with <server>: in the ODBC
source, even for local connections.
For example:
127.0.0.1:c:/blah/blah.fdb