Visual FoxPro Single-Tier JDBC-ODBC Bridge 32-BIT v.7

I want to access Visual FoxPro 9 (VFP9) at server name ‘vpf9host’ (64-BIT Windows Server 2016) from my Java application running on my local machine (64-BIT Windows 10 Enterprise).

  1. Using ODBC Admin Tool for 32-BIT Drivers, we set up System DSN called ‘VisualFoxProDev’ on server ‘vpf9host’ where VFP9 is installed, configured as ‘Visual FoxPro Database’ and Path=‘E:\DEV\Data\vfp9data.dbc’, and Data Source Name (DSN) = ‘VisualFoxProDev’.
  2. I created a stand-alone Java client hoping to connect to ‘VisualFoxProDev’ using Single-Tier bridge jdbc-odbc ‘openlink.jdbc4.Driver’ v.7 for 32-BIT. I’m using JRE 1.8.0_261 32-bit JVM. My database URL is ‘jdbc:openlink://vpf9host/DSN=VisualFoxProDev’. (No user/pwd required). However I get error:
    java.sql.SQLException: [OpenLink][OPLJDBC4]Connection failed: Connection timed out: connect
    at openlink.jdbc4.OPLMessage.makeException(Unknown Source)
    at openlink.jdbc4.Driver.connect(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at TestBridge.main(

For the OpenLink Single-Tier JDBC-ODBC Bridge the JDBC connect string URL format is:


Where ODBC is the the keyword to trigger the JDBC-ODBC invocation as detailed in the Single-Tier JDBC driver documentation, which is not in the connect string you provide ie jdbc:openlink://vpf9host/DSN=VisualFoxProDev , which should be jdbc:openlink://ODBC/DSN=VisualFoxProDev , I would expect.

Thanks and Kudos to you that finally I’m able to make the connection and successfully ran an insert sql statement.
Next, I’m trying to ran a VFP9 stored procedure called ‘getregions()’ . It has no input parameter, and should return the word ‘Success’. Using CallableStatement I tried various syntax, like :

calledStmnt = connection.prepareCall("{call getregions()}"); or
calledStmnt = connection.prepareCall("{? = call getregions()}");

However I get error:
java.sql.SQLException: [OpenLink][OPLJDBC4][ODBC Server][Microsoft][ODBC Visual FoxPro Driver]Syntax error or access violation
at openlink.jdbc4.OPLMessage.makeException(Unknown Source)
at openlink.jdbc4.OPLPreparedStatement.(Unknown Source)
at openlink.jdbc4.OPLCallableStatement.(Unknown Source)
at openlink.jdbc4.OPLConnection.prepareCall(Unknown Source)

Our JDBC-ODBC bridge does not do parser or change the query being passed to the target ODBC Driver. The error is coming from the Visual FoxPro ODBC Driver, indicating the SQL syntax of the query being passed is incorrect for the database. The following documentation shows the stored procedure syntax supported by FoxPro:

which is something like execute Test ?@iResult

Hi Thanks for the quick response. I will give it a try and will let you know.