///////////////////////////////////////////////////////////////////////////////////////////
Class.forName("net.ucanaccess.jdbc.UcanaccessDriver");
Connection conn=DriverManager.getConnection("jdbc:ucanaccess://<mdb or accdb file path>",user, password);
or
Connection conn=DriverManager.getConnection("jdbc:ucanaccess://<mdb or accdb file path>");
///////////////////////////////////////////////////////////////////////////////////////////
Driver Properties(驱动参数)
Memory(是否在内存操作,默认Ture): set if hsqldb will work only in memory. Default=true.
Newdatabaseversion(如果路径文件不存在将自动设置版本的数据库文件,默认不配置): UCanAccess create a new access file in the specified version if this parameter is setted and the file specified in the jdbc url does not exist.
Valid values for this parameter are: V2000, V2003, V2007, V2010.
Lockmdb(锁定数据库文件,默认False): if lockmdb is enabled (lockmdb=true), Ucanaccess locks the mdb file to prevent access from other processes. Default=false.
Showschema: if true, catalog "PUBLIC" and schema "PUBLIC" and others hsqldb schemas are shown in the DatabaseMetadata implementation. Default=false. Using showschema=true is raccomanded with Squirrel.
InactivityTimeout (since UcanAccess 0.1.1): it is used only with the default memory mode (Memory=true). If there are no active connections for the inactivityTimeout period (in minutes) hsqldb will be temporarily shutted down and also the filesystem resources will be released. It will be restarted at the next connection. Setting InactivityTimeout=0 can be used for avoiding this behavior. Default=2 minutes.
SingleConnection(since UcanAccess 1.0.0): it is used for for etl job, scheduled tasks or "one-shot" use of UCanAccess with only one connection open. All resources (memory and filesystem) will be released at the closing of the connection. Default=false.
Encrypt(since UcanaAccess 1.0.4): it allows hsqldb files encryption. You can use it in conjunction with Memory=false. Default=false.
Sysschema(since UcanaAccess 1.0.4):If true the msaccess system tables will be loaded in the "sys" readonly schema. Default=false.
Ignorecase: Disables (ignorecase = true) or enables (ignorecase = false) the case sensitivity of text comparison. Default=true.
for example:
Connection conn=DriverManager.getConnection("jdbc:ucanaccess://c:/pippo.mdb;lockmdb=true;ignorecase=true");
////////////////////////////////////////////////////////////////////////////////////////////
More Information
http://ucanaccess.sourceforge.net
AccessJdbc驱动JAR包
5星 · 超过95%的资源 需积分: 44 100 浏览量
2014-10-15
17:00:49
上传
评论 4
收藏 2.35MB ZIP 举报
手艺人WJ
- 粉丝: 6
- 资源: 9
最新资源
- Image_1713714819368.png
- 数据可视化 matplotlib 实例.docx
- Python 使用 Matplotlib 绘制甘特图的实践.docx
- matplotlib 中的 cmap 参数介绍.docx
- 基于matlab的毕业设计基于Matlab使用LQR实现车辆轨迹跟踪源码.zip
- 基于Matplotlib 的高互动性可视化系统设计与实现
- matplotlib 数据可视化报告.docx
- 传统网页UI设计在移动应用开发中的应用研究.pdf
- 基于pytorch实现BERT+BiLSTM+CRF实现中文命名实体识别源码.zip
- 校园帮项目,毕业设计/课程设计/javaWeb/SSM
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
- 1
- 2
- 3
- 4
- 5
前往页