Questions tagged [ucanaccess]

UCanAccess is a pure Java JDBC driver that allows us to read from and write to Microsoft Access databases without using ODBC.

UCanAccess is a pure Java JDBC driver that allows us to read from and write to Microsoft Access databases without using ODBC. It provides a cross-platform alternative to using the JDBC-ODBC Bridge (which has been removed from Java SE 8 and is not supported).

470 questions
2
votes
3 answers

How to ALTER TABLE using UCanAccess

I am using UCanAccess JDBC-driver (version 3.0.3.1) to connect to the mdb-file. And I need to add the column to existing table. The problem is that the statement ALTER TABLE TEmployee ADD COLUMN NotificationsEnabled BINARY throws the…
user3601262
  • 651
  • 1
  • 7
  • 22
2
votes
1 answer

Java application hangs when using UCanAccess to save data

I had a program for store student info into Microsoft accesss database I using ucanaccess, jre 1.8 and jdk 1.8 however the data I directly write into database can display in my program but the data I input in program cannot write into database, it…
B.Cos
  • 418
  • 1
  • 13
  • 27
2
votes
1 answer

How to access a database file on a remote machine via UCanAccess?

I am using the UCanAccess driver from http://ucanaccess.sourceforge.net/site.html By using this driver I am able to access a local Access database file from Java like…
2
votes
2 answers

Can/Should I pass a Connection object to functions?

I'm pretty green to DBMS and I'm required to write a Java program using JDBC to interact with an Access database file. I'm wondering if it's better practice, or even possible, to initialize the Connection in main and pass it to each method as needed…
PeterSon
  • 91
  • 7
2
votes
1 answer

UCanAccess reads the last column of a table as the first column

My program always reads the first column in the Access database as the 2nd column, the 2nd one as the 3rd column and so on, but the last column it reads as the first column. public void actionPerformed(ActionEvent e) { try{ String query =…
Wesley.C
  • 75
  • 6
2
votes
1 answer

Connect to an Access database from Java 8 without using UCanAccess

I am trying to connect to a local .mdb file using Java 8. So far I have used UCanAccess's libraries but not all features are supported. In Java 8 "JDBC/ODBC was scrapped"... So my question is: What is the new method to connect to .mdb files (without…
Kyle
  • 299
  • 1
  • 2
  • 11
2
votes
1 answer

"Invalid authorization specification" error on UCanAccess connect

I am having a problem with the UCanAccess driver namely that when I attempt to connect to a database using the following code public static void main(String[] args) { //establish connection with database in order to execute sql queries try…
2
votes
1 answer

Using NetBeans IDE's database manager with UCanAccess JDBC driver

I'm trying to use NetBeans' built-in database service system and the UCanAccess JDBC driver to connect to an MS Access database. After dragging and dropping the tables from the service panel to connect them to my JTables in my Swing GUIs everything…
2
votes
1 answer

"No suitable driver found" error when trying to connect with UCanAccess

I have the following code that I have modified according to this post's answer: Manipulating an Access database from Java without ODBC import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import…
George V
  • 87
  • 1
  • 2
  • 10
2
votes
1 answer

net.ucanaccess.jdbc.UcanaccessSQLException invalid cursor state

I am getting the below error. Could anyone please assist on the below ? I have 2 rows in database. The problem is the result set cursor is not moving i guess Console logs : connection established... rs execute... rs is not null rs is not…
2
votes
1 answer

How to write to an Access database on Windows 10

Because the jdbc odbc bridge is no longer available (see this question/answer), I tried UCanAccess, which works great reading the database, but on Windows 10, throws an error on a write attempt: ([CONCURRENT_PROCESS_ACCESS] - File marked as read…
Dale
  • 5,520
  • 4
  • 43
  • 79
2
votes
2 answers

Regular Expression matching when querying an Access database with UCanAccess

public TestDate() { fnDbConnect(); try { String sql = "SELECT ledate FROM tblTestDate WHERE (ledate REGEXP '^..........$')"; resultSet = st.executeQuery(sql); while (resultSet.next()) { …
Eclipse22
  • 553
  • 5
  • 11
2
votes
1 answer

"Bookmark not valid" error in Access database

I have a simple application that writes data from a MySQL database into an Access .accdb database. I have used it for 4 months and I haven't had any problems. Yesterday I tried to use it and now I have a problem. If I try to open the file with…
bircastri
  • 2,169
  • 13
  • 50
  • 119
2
votes
2 answers

"UcanaccessSQLException: unexpected token" when column name contains apostrophe

I am converting an existing program from JDBC-ODBC Bridge to UCanAccess. It has been working for years. The Java program writes to an MDB file. After conversion, one Insert command stopped working. It throws…
2
votes
1 answer

Can't move MS Access file after opening JDBC connection on it

I've got a Spring Batch job that is reading a specified Access database file. I'm using uncanaccess JDBC library to do so. Once the job exits, whether the job completes successfully or not, I need to have my application move the access file to…
IceBox13
  • 1,338
  • 1
  • 14
  • 21