Home All Groups Group Topic Archive Search About

JDBC connection for DBF files

Author
19 Dec 2006 5:59 PM
deepak.n.l
I am not able to connect to DBF files:

I am getting this following error:

DBF Driver Driver not found!
java.sql.SQLException: No suitable driver

I am using
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

and the code that I am using to connect is:

String databaseURL = "jdbc:odbc:Driver={Microsoft Visual FoxPro
Driver};UID=;PWD=; SourceDB=" + filename +
";SourceType=DBF;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes";

return DriverManager.getConnection(databaseURL, "", "");

where filename = the folder where my DBF files are residing.

Author
4 Jan 2007 4:50 PM
Alfred Rakgole
Hi Deepak,

U might want to try more JAVA newsgroups than .NET even though FoxPro is
Microsoft.
See http://java.sun.com/products/jdbc/faq.html and search for foxpro...

BR
Alfred

<deepak.***@gmail.com> wrote in message
Show quote
news:1166551143.884518.39540@t46g2000cwa.googlegroups.com...
>I am not able to connect to DBF files:
>
> I am getting this following error:
>
> DBF Driver Driver not found!
> java.sql.SQLException: No suitable driver
>
> I am using
> Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
>
> and the code that I am using to connect is:
>
> String databaseURL = "jdbc:odbc:Driver={Microsoft Visual FoxPro
> Driver};UID=;PWD=; SourceDB=" + filename +
> ";SourceType=DBF;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes";
>
> return DriverManager.getConnection(databaseURL, "", "");
>
> where filename = the folder where my DBF files are residing.
>

AddThis Social Bookmark Button