Reputation: 307
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
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