wood burning stoves
The moose likes JDBC and Relational Databases and the fly likes Connect FoxPro DB using JDBC ODBC Bridge - new Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Reply locked New topic

Connect FoxPro DB using JDBC ODBC Bridge - new

Tony Caos

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

I�m Tony. I�m trying to connect to FoxPro DB using JDBC ODBC bridge. And I�ve got a trouble with it.

I created an ODBC bridge at System DSN with:
- Database Type: Free Table directory
- Driver:
- collating sequence: machine.
- Exclusive: no checked.
- Fetch data in background: checked.

And my coding is:
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.

Please help me to fix this trouble. I do appreciate.


Tony Caos
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33127

Closing accidental duplicate thread

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link: http://aspose.com/file-tools
subject: Connect FoxPro DB using JDBC ODBC Bridge - new
jQuery in Action, 3rd edition