wood burning stoves 2.0*
The moose likes JDBC and the fly likes Connect FoxPro DB using JDBC ODBC Bridge Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Connect FoxPro DB using JDBC ODBC Bridge" Watch "Connect FoxPro DB using JDBC ODBC Bridge" New topic

Connect FoxPro DB using JDBC ODBC Bridge

Tony Caos

Joined: Jun 28, 2006
Posts: 2
Hi all,

I'm Tony. I've got a trouble when trying to connect to FoxPro DB using JDBC ODBC Bridge.

I create an ODBC bridge on System DSN with:

Here's my coding:
try {
// load driver...

// create connection...
String url = "jdbcdbc:TestDBF";
Connection con = DriverManager.getConnection(url);

// test sql prepared statement...
String sql = "SELECT count(*) as count_result FROM USERS";
PreparedStatement stmt = con.prepareStatement(sql);
ResultSet rs = stmt.executeQuery();
int count = 0;
while(rs.next()) {
count = rs.getInt("count_result");

catch(Exception exc) {

It run properly if I deploy as a Java Application.
But when I deployed on Web Application using WebSphere Application Server 6.0, it throws the errors:
- java.sql.SQLException: [Microsoft][ODBC Visual FoxPro Driver]File 'users.dbf' does not exist.
I agree. Here's the link: http://aspose.com/file-tools
subject: Connect FoxPro DB using JDBC ODBC Bridge