12

my question is: how to connect java tp paradox / borland database ".DB" single files?

Here's what I have: screenshot So, it's Paradox 7 database files.

I'm trying drivers: http://www.hxtt.com/paradox.html & https://code.google.com/archive/p/paradoxdriver/ as:

String url = "jdbc:paradox:/D:/BABAK/powerGold/SongTitle.DB";
Connection con = DriverManager.getConnection(url);

But both throws exceptions like:

D:/BABAK/powerGold/SongTitle.DB isn't a database directory path!

As you can see, it is trying to find some database folder, but I have only single files! Also, "jdbc:paradox:/D:/BABAK/powerGold" (path to all .DB files folder) didn't work as well.

So, anybody, please help me to figure out, how to open this type of DB in my Java app.

Alex Babak
  • 489
  • 3
  • 15

3 Answers3

1

jdbc:paradox:D:/BABAK/powerGold is the correct syntax.

One of the open source Paradox drivers you mentioned is now on Github and has had more features added since a couple of years ago, so that may now work.

If it doesn't, can you post the full stack trace (using this library, not the HXTT one) so we can figure out exactly what's going on? I'm not the original author, but I have made several contributions for different field types.

Michael Berry
  • 70,193
  • 21
  • 157
  • 216
0

you're not trying to open the database doing so but a specific file of the whole DB. In fact your DB is composed of files .db, .px ....

The best approach to do so, is to migrate since this DB is not supported, and realy brings a lot of bugs.

I will recommand you to use migrate your database.

  1. install Paradox Database Reader or Editor
  2. export tables to CSV files
  3. import tables in mysql Database (for example)

If you still want to connect this DB without migration with java, share in private a file .db and will give a try now.

jeorfevre
  • 2,286
  • 1
  • 17
  • 27
  • hello! Migration isn't possible: it's a live DB of an everyday used software, so, I need some way to connect & open it, as Paradox Data Editor does. Sending you a .DB file on Twitter (and here's the link: http://6zo.ru/powerGold_DB_Example.zip , there's nothing secret inside) – Alex Babak May 13 '16 at 12:41
0

To solve it do the following:

  1. String url = "jdbc:paradox:/D:/BABAK/powerGold/";
  2. keep the same files .db and .px of SongTitle in the same directory then run your code and it will work
Manfred Radlwimmer
  • 13,257
  • 13
  • 53
  • 62
Dhahi
  • 1
  • 1
  • I'll try, but take a look to question: > Also, "jdbc:paradox:/D:/BABAK/powerGold" (path to all .DB files folder) didn't work as well. – Alex Babak Jun 19 '17 at 10:07