firebird java_Firebird与java的连接

端木阳荣
2023-12-01

我在

Windows XP上安装了Firebird 2.1,并使用firebirdsql.jdbc-2.1.6驱动程序与java连接.码:

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

connection = DriverManager.getConnection(

"jdbc:firebirdsql://localhost/3050//C:/firebird/database/EMPLOYEE.FDB",

"test","test");

我收到以下错误:

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)

请帮忙.

问题解决了:

实际上我有来自jar文件的问题

我从firebird官方网站下载了jaybird-full-2.1.6.jar,问题解决了.

正确的URL是

"jdbc:firebirdsql://localhost:3050/C:\\firebird\\database\\EMPLOYEE.FDB"

我之前也尝试过这个URL,但由于jar问题而无法正常工作.

 类似资料: