问题标签 [jackcess]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
835 浏览

java - 使用 Jackcess 从 Ubuntu 14.04 服务器访问 Microsoft Access 数据库

我已经在我的 Ubuntu 14.04 服务器(IP:192.168.0.130)上安装了 Jackcess 2.0.4 API。现在我想访问 Windows 2003 R2 服务器(IP:192.168.0.125)上的 Microsoft Access 2010 DB。

我该怎么做呢 ?

0 投票
1 回答
764 浏览

jackcess - 如何禁用连接检查约束

java.sql.DriverManager.getConnection("jdbc:ucanaccess:///user/dev/project/project.mdb")

我有这个错误

Java::NetUcanaccessJdbc::UcanaccessSQLException: 完整性约束违规:NOT NULL 检查约束;SYS_CT_10991 表:EMPLOYE 列:DATE

我不想在连接处控制完整性,在连接处禁用检查约束的属性参数是什么?

感谢您的帮助

0 投票
1 回答
315 浏览

jackcess - How to search rows with corresponding date in newEntryIterable?

How to search rows with corresponding date in newEntryIterable

Example :

No rows are returned, but there are rows with date = 01/03/2014 in my database.

0 投票
1 回答
773 浏览

java - Jackcess 等效于带有 >(“严格大于”)条件的 SQL WHERE 子句

我想搜索日期列的值 > '2014/03/01' 的所有行。

怎么能做到这一点?如果没有 Date value = '2014/03/01'` 的行,如何在没有完整扫描表的情况下定位光标?

0 投票
1 回答
926 浏览

java - Jackcess,循环与多个匹配的行非常慢,

我执行这个我的代码,我不明白为什么循环的经过时间非常高。

有两个循环。Invoices 表上的第一个循环和 InvoicesLignes 表上的 seconde 循环。

InvoicesLignes 表有一个索引“Code”,它是 Invoice 的“外键”。在数据库 Access 中,Invoices 和 InvoicesLines 之间存在关系,但未定义外键,我无法使用 Joiner 类。我无法修改数据库。

我的日志是

我不明白为什么循环的经过时间非常高

感谢您的帮助

0 投票
1 回答
187 浏览

java - Jackcess 可以与 MS Access 2013 一起使用吗?

我正在编写一个 Java 应用程序,它为用户创建一些数据,并且需要生成一个 Access 文件,然后用户可以下载并使用 MS Access 打开该文件。用户拥有 MS Access 2013。

我在网上找到的唯一 Java 库是 Jackcess。但是,在他们的文档和 API 中,他们只升级到 V2010。

使用 File Format V2010 生成的文件会被 Access 2013 打开吗?根据迄今为止的研究 - 没有。

是否有任何其他解决方案可以让 Java 程序创建 Access 2013 文件?请分享!Java + Access 2013 的所有帮助都用于连接到 Access 2013 数据库。我不需要连接,我只需要创建一个用户将导入的文件。

0 投票
1 回答
318 浏览

java - 在 servlet 写入客户端期间访问 (.mdb) 文件损坏

这最初是另一个线程的第 2 部分,但另一个用途建议我将第 2 部分分成它自己的主题,所以我们开始吧。原始线程在这里(原始线程

我正在使用 Jackcess 创建一个 V2010 mdb 文件,我需要将其传输到将使用 Access 2013 打开它的客户端。Jackcess 本身可以工作 - V2010 创建一个文件,当文件通过第三方软件(例如 FAR)通过 FTP 传输到客户端时,Access 2013 可以打开该文件。但是,当我尝试通过 servlet 将该文件上传到客户端时(这是该项目的目标),客户端上的 Access 显示“无法识别的数据库格式”......文件名......”。这是使用的代码用于上传。代码本身可以工作,文件已传输,如果已保存,则其大小非零 - 但 Access 无法打开它。

请注意,对于内容类型,我还尝试了 vnd.msassess 和 octed-stream,但结果相同。此外,我尝试关闭数据库并从文件名创建 FileInputStream,并且如示例中所示,尝试通过调用 mydb.getFile() 创建 FileInputStream。没有不同。

为什么这段代码会破坏 mdb 文件?每次都会发生这种情况,无论大小如何(我尝试了一个 2 列/1 行的小文件,以及一个 40 列和 80000 行的大文件)

谢谢!

0 投票
1 回答
385 浏览

java - Jackcess 编译错误

我一直在四处寻找这个问题的答案,但我似乎无法让它发挥作用。我已经看到了对他们有用的确切示例,并且我尝试了他们的工作,但它对我不起作用。

基本上我想做的是打开一个本地访问数据库。我已经尝试了很多方法,这个 Jackcess 似乎是迄今为止最好的库,所以我试图让它与它一起工作。我已经阅读了他们的食谱并经历了所有这些,但仍然没有运气,所以我来找你们,希望找到一个好的解决方案(我还没有在任何地方发布这个问题)。这是我的代码(相关部分)

我得到的唯一语法错误是“DatabaseBuilder.Open”,错误是它找不到方法,即使我为 IO 包含了库

任何帮助将不胜感激!

一旦我点击了这个按钮,程序就无法调试,我唯一可以接受的实际消息是

“找不到符号符号:方法打开(文件)位置:变量。对象类型的数据库生成器”

0 投票
1 回答
905 浏览

java - Receiving java.lang.IllegalArgumentException: invalid fixed length size, using Jackcess library

I need help in a routine I've written to dump the content of a class (which represent a database table) to a new database table in MS Access. My code is the following:

When I try to save the table to the actual database, I get the exception:

DataTypes were saved before using the same database I am writing (I am basically updating the database), using the code:

What am I doing wrong?

0 投票
2 回答
3406 浏览

java - Convert byte[] with binary data to String

I have data in binary format (hex: 80 3b c8 87 0a 89) and I need to convert that into String in order to save binary data in MS Access db via Jackcess. I know, that I'm not suppose to use String in Java for binary data, however Access db is third party product and I have not control whatsoever.

So I tried to convert binary data and save it, but unfortunately the result was unexpected.

I would like to know what going on under new String and if there is a way to convert binary data into String and have the same hex values.

Note 1: initially I read a binary file which has nothing to do with hex. I use hex just for comparison of datasets.

Note 2 There was a suggestion to use Base64 aka MIME, UTF-7, etc. By my understanding, it takes binary data and encodes that into ANSI charset, basically tweaking initial data. However,for me that is not a solution, because I must write exact data that I hold in binary array.