Subject | Re: unavailable database with type2 and java as a service |
---|---|
Author | Roman Rokytskyy |
Post date | 2004-05-10T21:39:38Z |
Hi,
org.firebirdsql.pool.FBWrappingDataSource dataSource =
new org.firebirdsql.pool.FBWrappingDataSource();
dataSource.setDatabase ("e:/database/employee.gdb");
dataSource.setType("LOCAL");
dataSource.setDescription ("An example database of employees");
dataSource.setSqlRole("USER");
dataSource.setEncoding("NONE");
dataSource.setLoginTimeout (10);
java.sql.Connection c =
dataSource.getConnection ("sysdba", "masterkey");
c.close();
It works on my XP Professional when I place database on my memory
stick as well as on the mapped network drive (I use coLinux-enabled
Debian sarge with Samba, for the clean experiment I have stopped
Firebird server on that Linux node).
Can somebody else confirm this issue?
Thanks!
Roman
> FBWrappingDataSource dataSource = new FBWrappingDataSource();Strange. I cannot reproduce this. I have tried DataSourceExample example:
> dataSource.setDatabase("localhost/3050:e:/dbtest.gdb");
> dataSource.setType("LOCAL");
> dataSource.setUserName(user);
> dataSource.setPassword(passwort);
> dataSource.setEncoding("WIN1252");
> dataSource.setMinConnections(5);
> dataSource.setMaxConnections(20);
> dataSource.setPooling(true);
> dataSource.setBlockingTimeout(2000);
> dataSource.setLoginTimeout(2000);
>
> This is working always.
> with:
> dataSource.setDatabase("e:/dbtest.gdb");
> if my application working dir is d and not drive e i get the
> following exception:
> org.firebirdsql.jdbc.FBSQLException: Resource Exception. I/O error
> during "CreateFile (open)" operation for file "D:\DBTEST.GDB"
> Error while trying to open file
> null
org.firebirdsql.pool.FBWrappingDataSource dataSource =
new org.firebirdsql.pool.FBWrappingDataSource();
dataSource.setDatabase ("e:/database/employee.gdb");
dataSource.setType("LOCAL");
dataSource.setDescription ("An example database of employees");
dataSource.setSqlRole("USER");
dataSource.setEncoding("NONE");
dataSource.setLoginTimeout (10);
java.sql.Connection c =
dataSource.getConnection ("sysdba", "masterkey");
c.close();
It works on my XP Professional when I place database on my memory
stick as well as on the mapped network drive (I use coLinux-enabled
Debian sarge with Samba, for the clean experiment I have stopped
Firebird server on that Linux node).
Can somebody else confirm this issue?
Thanks!
Roman