Questions tagged [jackcess]

Jackcess is a pure Java library for reading from and writing to MS Access databases

Jackcess is a Java library providing read/write support for Access database versions 2000 through 2010(+), and read-only support for Access 97 files.

It provides interfaces to open an existing database, iterate over contained tables and read information from the rows in the table. It also allows to create new tables and populate data in them.

Additionally it has functionality to import data from and sources. Separately available extensions allow to read encrypted files.

130 questions
2
votes
1 answer

Finding Row with the column of Yes/No Type in jackcess

I am using jackess 2 for reading a Access file in Java. Below is the code. In the table that I read, I have only 1 row. There is a column called "Active" of type "Yes/No" in MS-Access. When I print all values in the table, the value of Active column…
Purus
  • 5,701
  • 9
  • 50
  • 89
2
votes
1 answer

Jackcess addRow() cannot insert a Java 'long' value

I'm trying to add a row with id number 3791318595. long l = 3791318595L; myTable.addRow(l,"testing"); however Jackcess transforms it into an integer and cuts to its max value: 2,147,483,647. How can I correctly add the above number with Jackcess?
dendini
  • 3,842
  • 9
  • 37
  • 74
2
votes
0 answers

Create MS Access password protected file using java program with Jackcess api

I created ms access file using Jackcess api with following code, File is create successfully in all format mdb, accdb; import com.healthmarketscience.jackcess.ColumnBuilder; import com.healthmarketscience.jackcess.Database; import…
Vishakha Pol
  • 80
  • 1
  • 7
2
votes
3 answers

Creating a new MS Access file in Java using Jackcess

I have referred selected answer to this question: Java: Create MSAccess Database File (.mdb 0r .accdb) using Java. I have MS Office 2010 in my machine. I am trying to create access database file (*.mdb / *.accdb). But, still the file is not getting…
Sarang
  • 339
  • 2
  • 6
  • 16
1
vote
2 answers

jackcess delete row and set autoincrement column

How delete row from table with help jackcess? I try so, but it's bad: Table ptabl = db.getTable("person"); int pcount = ptabl.getRowCount(); for (int i = 0; i < pcount; i++) { Map row2 = ptabl.getNextRow(); …
1
vote
1 answer

JackCess "NoClassDefFoundError: java/sql/Blob" exception

The following simple java program: import com.healthmarketscience.jackcess.util.OleBlob; public class Test { public static void main(String[] args) throws Exception { byte[] data = new byte[100]; OleBlob oleBlob =…
ray_ray_ray
  • 316
  • 1
  • 14
1
vote
2 answers

Output Access DB query data to a csv file using Java

I am able to open the database file and get the query name and the statement. How do I output the query data to a csv? I thought he below exportWriter would do it but it doesn't work. Database db = Database.open(new File(args[0])); for(Query…
zjb
  • 11
  • 1
1
vote
2 answers

Is there a proper way to use wildcards/regex in Jackcess?

I have recently started using the Jackcess library in Java for dealing with MS Access databases. The library is pretty good but I have a question regarding searching rows. Consider that I have "Jack loves apples" in a row of a column named X, what…
user8676160
1
vote
2 answers

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/lang/builder/CompareToBuilder

package myJavaPrograms; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; public class AccessDBFiles { public static void main(String[] args) throws…
1
vote
1 answer

How do I convert from a long to an Access Date/Time value in Jackcess?

I have the following code: // Model the table Table tbl = new TableBuilder("Transactions") .addColumn(new ColumnBuilder("TransactionID", DataType.LONG).setAutoNumber(true)) .addColumn(new ColumnBuilder("ControllerID",…
Agi Hammerthief
  • 2,114
  • 1
  • 22
  • 38
1
vote
1 answer

How do I make uCanAccess use Samba authentication, with special characters in username or password?

TL;DR: What Database.FileFormat constant should I use for an MS Access 2000-2003 database, when creating the Database object? I have built a SAMBA test application using jCIFS. It allows me to create/overwrite files if given the correct…
Agi Hammerthief
  • 2,114
  • 1
  • 22
  • 38
1
vote
1 answer

Error in creating a copy of mdb in memory

I am using below code to creating a copy of mdb file in memory but its giving null pointer exception on DatabaseBuilder constructor that no file exist, what i want is to create a copy of this manipulate it and return the copy to outputstream. File…
Haider
  • 615
  • 1
  • 16
  • 38
1
vote
1 answer

UCanAccess/Jackcess Create View/Save Query in Access

In Access you can save queries in a view. In my Java project I use UCanAccess with the underlying Jackcess library. The normal SQL Statement CREATE VIEW AS