File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases 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

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
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( {
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:
subject: Connect FoxPro DB using JDBC ODBC Bridge
It's not a secret anymore!