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
0
votes
1 answer

How to CREATE TABLE with unique constraint on two columns using UCanAccess?

How to write sql query to create table with unique constraint on 2 columns using jdbc: I try this code and give me "SQLException: Invalid create statement!": Connection conn = ConnectDB.getConnection(); Statement stmt = null; try { …
Ayman
  • 81
  • 2
  • 10
0
votes
1 answer

prepared statements and result sets - Java null pointer exception

Overview: Trying to connect to a MS Access DB to return a result set into a jtable. Issue: java null pointer exception Code: package sundata; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import…
ppw
  • 155
  • 4
  • 17
-1
votes
1 answer

ucanaccess exception UCAExc:::5.0.1 type not found or user lacks privilege: EXT_DATE_TIME

I am getting this error when running a login screen. I'm really not sure what the issue is as I followed a tutorial, and for him it worked fine. Here is my code: private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { …
-1
votes
1 answer

Using UCanAccess with DNS

How can I access ODBC 32-bit drivers with UCanAccess with DNS? jdbc:ucanaccess:pmg Here is the 32-bit driver from a custom ODBC driver: I'm using Java 11 with JavaFX.
Charlo Poitras
  • 198
  • 1
  • 14
-1
votes
1 answer

SQLException: UCAExc:::5.0.0 row column count mismatch

I have a project created by java code, and a database that has two tables (table1 and table2) looks like this: -------table1-------- Name | Ref __________|__________ A | 100 B | 200 __________|__________ and…
waroa kawa
  • 29
  • 8
-1
votes
1 answer

Database connection with JDBC using Ucanaccess no output

I try to create a connection between JDBC and MS Access. I follow the instruction as per this link. I am using IntelliJ Idea. Here I am sharing some snaps to describe my problem. This is the code that I write down to make a connection with Database…
Encipher
  • 1,370
  • 1
  • 14
  • 31
-1
votes
1 answer

UcanaccessSQLException: how can I get the values from my Resultset?

I want to get the results from my query. I get the ResultSet with next() = true. But when I do getString() I get the following error: "Incorrect cursor status: indicated cursor is not positioned in a row for UPDATE, DELETE, SET, or GET statement:;…
Adriana_0_0
  • 85
  • 2
  • 7
-1
votes
1 answer

Java and Access - use Prepared Statement and get date

I'm doing a JavaAFX application using the MS Access 2007 database. I need to extract data from the database by filtering after the date. This work good: ResultSet rs = stat.executeQuery("SELECT * FROM Notification WHERE postDate>=#2018-01-18# AND…
Light
  • 175
  • 1
  • 2
  • 11
-1
votes
1 answer

List all the tables in a database

I am using ucanaccess to manage a SQL database in Java. I've done Initial setup using the answer from the question - setting up ucanaccess After setting up, I am successfully able to Create Tables, Insert into Tables however, I am not able to list…
maddman
  • 1
  • 1
  • 5
-1
votes
1 answer

Ucanaccess throwing exception

When I am trying to fetch data from access database ucanaccess driver is throwing this exception net.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::4.0.4 data type cast needed for parameter or null literal here is the screen of my application…
-1
votes
1 answer

java ucanaccess data storing

i tried to store in two column current data and time on my microsft access database from java, but when i open my file no data has been stored. I tried to print the columns but it print "null". How can i do? Date date = new Date(); final String…
-1
votes
1 answer

java - ResultSet displaying as String

I am using the ucanaccess tool to interact with my access database, but I do not know how to display or store the resulting ResultSets as Strings. Edit: I have tried =System.out.println(resultSetId.getString(1)); but that only returns errors. …
-1
votes
1 answer

No suitable driver found for jdbc:ucanaccess: i got this error when i try connect to Ms access database

I trying to get data from ms access database stored in Azure File Storage. I set right path to storage, but when I try to get data from base I got this error.My application work fine when ms access database is on my machine. This is my…
Triso
  • 35
  • 9
-1
votes
1 answer

Open command console and pass arguments into it using VBA Access

I have this: Private Sub Command25_Click() Dim BatFile As String BatFile = "C:\UCanAccess-4.0.2-bin\console.bat" Shell BatFile & " " & """C:\Users\celso\Documents\KeysConsole.accdb""" What I want is to use UCanAccess to connect to my…
Celso
  • 1
  • 1
-1
votes
1 answer

Retrieving primary key information with UCanAccess

I'm trying to get all database metadata from an Access database using the UCanAccess JDBC driver but I need to change my resultset type to navigate in the resultset but how to set the good type when my resultset are created with method from the…
kazor02x
  • 43
  • 2
  • 8