Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JDBC connection to visual foxpro9

843859Sep 9 2005 — edited Sep 9 2005
Hello 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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 7 2005
Added on Sep 9 2005
1 comment
200 views