• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Accessing Foxpro table using servlerts/jsp

 
Dennis Laydia
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys!
I am currently developing a web application that uses MySQL database mainly.
My problem is I also need to access a legacy program that uses foxpro. How can I access a foxpro table using servlets or jsp? Your help will be very much appreciated. Thanks in advance.
 
Joe Ess
Bartender
Posts: 9295
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you make an ODBC data source for the Foxpro database? I'd think then you could use the JDBC-ODBC bridge to get to it.
 
Dennis Laydia
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Joe!
I think that would not be a problem because foxpro drivers is already
bundled with windows. Thanks a lot I'll start looking for a free jdbc-odbc bridge driver.
 
Joe Ess
Bartender
Posts: 9295
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JDBC-ODBC bridge comes with the Java SDK. It's called sun.jdbc.odbc.JdbcOdbcDriver.
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here are some other options ( not sure if they are free though ):
http://www.hxtt.net/en/software/product.jsp
http://www.datadirect-technologies.com
http://www.inprise.com
http://www.j-netdirect.com
 
Dennis Laydia
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys! I've already used JDBC-ODBC bridge and it works. My only problem is that there seem to be a problem when executing SQL DELETE STATEMENT. When I browse the table the record that I deleted is still there even though I already deleted it. Any Idea?
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dennis, make sure you commit the transaction. Also, make sure you have the latest ODBC drivers loaded on your machine. If it still doesn't work and you are sure that the code should be working, then there might be a problem similar to that of MSAccess. Try doing a select statement to the table that you inserted to. This is a useless query, but in MSAccess it somehow jump kicks the database to finish the delete otherwise the last inserted value won't get deleted.
But first I would make sure you are using the latest ODBC drivers available.
Jamie
 
Dennis Laydia
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jamie. I already did both of that I already used the latest ODBC driver and executed PACK statement after the delete statement but the PACK statement generated an error saying that the table should be opened exclusively. One of my friends said that maybe the delete statement only marked the record/records for deletion and not actually delete it that is why I can still browse the data using Visual Foxpro.
 
Don Hagan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dennis
Your friend is correct about the record only being marked for deletion.
To permanently remove a record from a VFP table the table must be opened exculsively. The PACK command actually physically removes all records marked for deletion. Under VFP's default settings, records marked for deletion will have a black box in the leftmost column when being browsed.
This behavior is one indication that VFP is not a server database like Oracle or DB2.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic