java 密码 access数据库,如何将UCanAccess连接到使用数据库密码加密的Access数据库?...

本文介绍了如何解决使用UCanAccess连接到设置密码加密的Access数据库时遇到的问题。通过添加jackcess-encrypt.jar和bcprov-ext-jdk15on-152库,创建自定义的CryptCodecOpener类并覆盖open方法,然后修改数据库连接代码,使用jackcessOpener参数指定自定义的Opener,从而成功连接到加密的数据库。
摘要由CSDN通过智能技术生成

I've developed a Java application (a dictionary) with an Access database to store the words of the dictionary and I'm getting ready to distribute it.

I want to encrypt my database with a password to prevent people to access my words.

When I set a passwords the Java code shows this Exception

net.ucanaccess.jdbc.UcanaccessSQLException: Decoding not supported. Please choose a CodecProvider which supports reading the current database encoding.

at net.ucanaccess.jdbc.UcanaccessDriver.connect(UcanaccessDriver.java:247)

Here is my connection code before encryption of my database with password ....

String s1="jdbc:ucanaccess://";

String user="";

String pass="";

String s4="words.accdb";

public void connectToDB(){

//database connection

try {

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值