资源简介
关于Jaybird-2.1.6JDK_1.5的使用方法如下:
首先:安装Jaybird
第一步:将根目录下的
jaybird21.dll,
GDS32.DLL,
icudt30.dll,
icuuc30.dll,
fbembed.dll,
icuin30.dll
fbclient.dll(对于非嵌入式型FB数据库的连接为必须)
这几个文件放在system32下面
第二步:把 jaybird 里的三个jar文件放在应用程序的相应的classpath里,然后
第三步:
加载实例:
关于实例文件DataSourceExample.java的使用
如果是连接非嵌入式FB数据库,则将
dataSource.setType("EMBEDDED");改为dataSource.setType("LOCAL")
【位于DataSourceExample.java源文件中,如果不修改,则显示不能连接成功】
其次:
java中连接文件的写法:
driverName = "org.firebirdsql.jdbc.FBDriver";
URLName = "jdbc:firebirdsql:embedded:E:/Project/test.fdb";
user = "sysdba";
password = "masterkey";
今日:研究FB数据库许久,参考了网友的资料,不胜感激!于MyEclipse6.0.1上调试成功,在此同大家分享。
代码片段和文件信息
// Original version of this file was part of InterClient 2.01 examples
//
// Copyright Interbase Software Corporation 1998.
// Written by com.inprise.interbase.interclient.r&d.PaulOstler :-)
//
// Code was modified by Roman Rokytskyy to show that Firebird JCA-JDBC driver
// does not introduce additional complexity in normal driver usage scenario.
//
// An example of using a JDBC 2 Standard Extension DataSource.
// The DataSource facility provides an alternative to the JDBC DriverManager
// essentially duplicating all of the driver manager抯 useful functionality.
// Although both mechanisms may be used by the same application if desired
// JavaSoft encourages developers to regard the DriverManager as a legacy
// feature of the JDBC API.
// Applications should use the DataSource API whenever possible.
// A JDBC implementation that is accessed via the DataSource API is not
// automatically registered with the DriverManager.
// The DriverManager Driver and DriverPropertyInfo interfaces
// may be deprecated in the future.
public final class DataSourceExample
{
static public void main (String args[]) throws Exception
{
// Create an Firebird data source manually;
org.firebirdsql.pool.FBWrappingDataSource dataSource =
new org.firebirdsql.pool.FBWrappingDataSource();
// Set the standard properties
dataSource.setDatabase (“c:/Programme/Firebird.152/examples/employee.fdb“);
dataSource.setDescription (“An example database of employees“);
/*
* Following properties were not deleted in order to show differences
* between InterClient 2.01 data source implementation and Firebird one.
*/
//dataSource.setDataSourceName (“Employee“);
//dataSource.setPortNumber (3060);
//dataSource.setNetworkProtocol (“jdbc:interbase:“);
//dataSource.setRoleName (null);
// Set the non-standard properties
//dataSource.setCharSet (interbase.interclient.CharacterEncodings.NONE);
//dataSource.setSuggestedCachePages (0);
//dataSource.setSweepOnConnect (false);
// this some kind of equivalent to dataSource.setNetworkProtocol(String)
// possible values are “type4“ “type2“ and “embedded“.
dataSource.setType(“embedDED“);
// SQL Role can be set like this:
//
// dataSource.setRoleName(“USER“);
// Character encoding for the connection is set to NONE
dataSource.setEncoding(“ISO8859_1“);
// other non-standard properties do not have setters
// you can pass any DPB parameter
//
// dataSource.setNonStandardProperty(“isc_dpb_sweep“ null);
// dataSource.setNonStandardProperty(“isc_dpb_num_buffers“ “75“);
// Connect to the Firebird DataSource
try {
dataSource.setLoginTimeout (10);
java.sql.Connection c = dataSource.getConnection (“sysdba“ “masterkey“);
java.sql.Statement stmt = c.createStatement();
java.sql.ResultSet rs = stmt.executeQ
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 393216 2008-04-23 08:45 JAVA访问firebird数据库之Jaybird-2.1.6JDK_1.5+相关DLL文件+使用方法\GDS32.DLL
文件 73728 2006-07-05 23:50 JAVA访问firebird数据库之Jaybird-2.1.6JDK_1.5+相关DLL文件+使用方法\jaybird21.dll
文件 505097 2008-07-19 18:53 JAVA访问firebird数据库之Jaybird-2.1.6JDK_1.5+相关DLL文件+使用方法\Jaybird-2.1.6JDK_1.5\jaybird-2.1.6.rar
文件 73728 2006-07-05 23:50 JAVA访问firebird数据库之Jaybird-2.1.6JDK_1.5+相关DLL文件+使用方法\Jaybird-2.1.6JDK_1.5\jaybird21.dll
文件 141263 2006-07-06 23:27 JAVA访问firebird数据库之Jaybird-2.1.6JDK_1.5+相关DLL文件+使用方法\Jaybird-2.1.6JDK_1.5\libjaybird21.so
文件 10 2009-11-20 16:13 JAVA访问firebird数据库之Jaybird-2.1.6JDK_1.5+相关DLL文件+使用方法\Jaybird-2.1.6JDK_1.5\Desktop_2.ini
文件 233119 2008-07-19 18:19 JAVA访问firebird数据库之Jaybird-2.1.6JDK_1.5+相关DLL文件+使用方法\Jaybird-2.1.6JDK_1.5\release_notes.pdf
文件 388506 2006-08-06 15:22 JAVA访问firebird数据库之Jaybird-2.1.6JDK_1.5+相关DLL文件+使用方法\Jaybird-2.1.6JDK_1.5\ChangeLog
文件 553937 2008-07-19 18:53 JAVA访问firebird数据库之Jaybird-2.1.6JDK_1.5+相关DLL文件+使用方法\Jaybird-2.1.6JDK_1.5\jaybird-2.1.6.jar
文件 178738 2009-11-20 15:57 JAVA访问firebird数据库之Jaybird-2.1.6JDK_1.5+相关DLL文件+使用方法\Jaybird-2.1.6JDK_1.5\docs\faq.html
文件 10 2009-11-20 16:13 JAVA访问firebird数据库之Jaybird-2.1.6JDK_1.5+相关DLL文件+使用方法\Jaybird-2.1.6JDK_1.5\docs\Desktop_2.ini
文件 1231 2008-07-19 18:59 JAVA访问firebird数据库之Jaybird-2.1.6JDK_1.5+相关DLL文件+使用方法\Jaybird-2.1.6JDK_1.5\docs\api\st
文件 22773 2009-11-20 15:57 JAVA访问firebird数据库之Jaybird-2.1.6JDK_1.5+相关DLL文件+使用方法\Jaybird-2.1.6JDK_1.5\docs\api\org\firebirdsql\jdbc\package-tree.html
文件 22242 2009-11-20 15:57 JAVA访问firebird数据库之Jaybird-2.1.6JDK_1.5+相关DLL文件+使用方法\Jaybird-2.1.6JDK_1.5\docs\api\org\firebirdsql\jdbc\FirebirdBlob.BlobInputStream.html
文件 32445 2009-11-20 15:57 JAVA访问firebird数据库之Jaybird-2.1.6JDK_1.5+相关DLL文件+使用方法\Jaybird-2.1.6JDK_1.5\docs\api\org\firebirdsql\jdbc\InternalTransactionCoordinator.html
文件 18265 2009-11-20 15:57 JAVA访问firebird数据库之Jaybird-2.1.6JDK_1.5+相关DLL文件+使用方法\Jaybird-2.1.6JDK_1.5\docs\api\org\firebirdsql\jdbc\FBProcedureParam.html
文件 27622 2009-11-20 15:57 JAVA访问firebird数据库之Jaybird-2.1.6JDK_1.5+相关DLL文件+使用方法\Jaybird-2.1.6JDK_1.5\docs\api\org\firebirdsql\jdbc\InternalTransactionCoordinator.AutoCommitCoordinator.html
文件 11684 2009-11-20 15:57 JAVA访问firebird数据库之Jaybird-2.1.6JDK_1.5+相关DLL文件+使用方法\Jaybird-2.1.6JDK_1.5\docs\api\org\firebirdsql\jdbc\FirebirdBlob.BlobOutputStream.html
文件 44902 2009-11-20 15:57 JAVA访问firebird数据库之Jaybird-2.1.6JDK_1.5+相关DLL文件+使用方法\Jaybird-2.1.6JDK_1.5\docs\api\org\firebirdsql\jdbc\FBEscapedParser.html
文件 27963 2009-11-20 15:57 JAVA访问firebird数据库之Jaybird-2.1.6JDK_1.5+相关DLL文件+使用方法\Jaybird-2.1.6JDK_1.5\docs\api\org\firebirdsql\jdbc\InternalTransactionCoordinator.me
文件 16598 2009-11-20 15:57 JAVA访问firebird数据库之Jaybird-2.1.6JDK_1.5+相关DLL文件+使用方法\Jaybird-2.1.6JDK_1.5\docs\api\org\firebirdsql\jdbc\FBDriverNotCapableException.html
文件 26445 2009-11-20 15:57 JAVA访问firebird数据库之Jaybird-2.1.6JDK_1.5+相关DLL文件+使用方法\Jaybird-2.1.6JDK_1.5\docs\api\org\firebirdsql\jdbc\FBClob.html
文件 87016 2009-11-20 15:57 JAVA访问firebird数据库之Jaybird-2.1.6JDK_1.5+相关DLL文件+使用方法\Jaybird-2.1.6JDK_1.5\docs\api\org\firebirdsql\jdbc\AbstractStatement.html
文件 47376 2009-11-20 15:57 JAVA访问firebird数据库之Jaybird-2.1.6JDK_1.5+相关DLL文件+使用方法\Jaybird-2.1.6JDK_1.5\docs\api\org\firebirdsql\jdbc\FBBlob.html
文件 10 2009-11-20 16:13 JAVA访问firebird数据库之Jaybird-2.1.6JDK_1.5+相关DLL文件+使用方法\Jaybird-2.1.6JDK_1.5\docs\api\org\firebirdsql\jdbc\Desktop_2.ini
文件 27199 2009-11-20 15:57 JAVA访问firebird数据库之Jaybird-2.1.6JDK_1.5+相关DLL文件+使用方法\Jaybird-2.1.6JDK_1.5\docs\api\org\firebirdsql\jdbc\FBBlob.FBBlobInputStream.html
文件 27084 2009-11-20 15:57 JAVA访问firebird数据库之Jaybird-2.1.6JDK_1.5+相关DLL文件+使用方法\Jaybird-2.1.6JDK_1.5\docs\api\org\firebirdsql\jdbc\FBProcedureCall.html
文件 91670 2009-11-20 15:57 JAVA访问firebird数据库之Jaybird-2.1.6JDK_1.5+相关DLL文件+使用方法\Jaybird-2.1.6JDK_1.5\docs\api\org\firebirdsql\jdbc\AbstractConnection.html
文件 29054 2009-11-20 15:57 JAVA访问firebird数据库之Jaybird-2.1.6JDK_1.5+相关DLL文件+使用方法\Jaybird-2.1.6JDK_1.5\docs\api\org\firebirdsql\jdbc\FBDriver.html
文件 15114 2009-11-20 15:57 JAVA访问firebird数据库之Jaybird-2.1.6JDK_1.5+相关DLL文件+使用方法\Jaybird-2.1.6JDK_1.5\docs\api\org\firebirdsql\jdbc\FBDriverConsistencyCheckException.html
............此处省略212个文件信息
评论
共有 条评论