Maik
Maik

Reputation: 891

Java-Paradox Driver - can select but can't modify

I need to do some DB operations on a paradox database from within java code

(I didn't even know about the existance of paradox)

So i downloaded this driver as found out here: https://github.com/leonhad/paradoxdriver, and created a code to query the paradox DB. It works fine.

But when i try to delete some record on the same table where i can succesfully do selects, i get this error:

java.sql.SQLFeatureNotSupportedException: Unsupported operation.

The SQL is executed with "myStatement.execute(delete)" command, and it's the following:

delete from mytable where field1 = 3 or field1= 4

I'm quite confused, beacuse when connecting to the DB using the driver, I'm not giving any username/password, just

Class.forName("com.googlecode.paradox.Driver");
java.sql.Connection conn = DriverManager.getConnection("jdbc:paradox:./db");

Does this driver not allow delete operations?

Upvotes: 0

Views: 695

Answers (2)

itudor
itudor

Reputation: 13

The driver you are trying to use is incomplete, I have tried it too. The developer said two or three months ago that he would rewrite the driver (I need join select statement that doesn't work). The best paradox driver I found is http://www.hxtt.com/paradox.html, but it's not free. However it can be used for no more than 50 queries at once. Now I use the jdbc-odbc driver which is fine. It was removed in Java 8 but still can be used: https://stackoverflow.com/a/36875001/12298400.

Upvotes: 0

mwarren
mwarren

Reputation: 759

If you look at the code for the driver the executeUpdate() method is not implemented. Use execute() instead.

Also check your connection object with isReadOnly(), if it is read only try using setReadOnly(false).

EDIT

After more digging in the source code it looks like this driver has not implemented delete yet. It would be better to find another driver.

Upvotes: 1

Related Questions