JDBC connection to visual foxpro9
843859Sep 9 2005 — edited Sep 9 2005Hello All
I am trying to connect visual foxpro9 table(s) and edit data through jdbc connection.
Ok, I defined my dsn source, and the code as follows:
String url = "jdbc:odbc:foxproDSN;"+
"Deleted=No;"+
"Exclusive=No;"+
"SourceType=DBF;"+
"SourceDB=F:\\foxprodb\\mytable";
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn = DriverManager.getConnection(url, "userid","password");
Statement st = conn.createStatement();
ResultSet rec = st.executeQuery("delete FROM mytable");
while (rec.next()) {
System.out.println(rec.getObject(1).toString());
}
st.close();
} catch (Exception e) {
System.out.println("Error -" + e.toString());
}
}
I am getting this exception,
Error -java.sql.SQLException: [Microsoft][ODBC Visual FoxPro Driver]File 'matable.dbf' does not exist.
my table is there but con not reach it.
Any idea why is this happening?
Thanks in advance..
Selim Yucel.