BicaBicudo
BicaBicudo

Reputation: 307

How to create a BDE alias in Java programmatically?

Is it possible to create a BDE alias for Paradox in Java programmatically?

I'm trying like this:

import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;

public class Principal {
  public static void main(String[] args) {

    String dbName = null;
    java.sql.Connection conn = null;

    try {
      Class.forName("com.googlecode.paradox.Driver");
      conn = DriverManager.getConnection("jdbc:paradox:C:/temp/dummy.db");
      dbName = conn.getCatalog();
    } catch (ClassNotFoundException | SQLException ex) {
      Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    }
    System.out.println(dbName);
  }
}

Upvotes: 0

Views: 189

Answers (1)

Paul Cochrane
Paul Cochrane

Reputation: 399

In paradox bde aliases are setup using the bde configuration utility that borland/Corel supplied with the bde.

This creates a cfg file that is binary and not editable by hand. All versions of the bde config utility were also rather buggy and tended to break at the earliest opportunity.

However I suspect that you dont really need the bde as you are using java. Bde was more for use with paradox/Delphi. I think you are probably looking for creating an ODBC connection to paradox tables which I don’t think requires the bde (but I may be wrong).

Upvotes: 1

Related Questions