Our company is in the process of migrating from Clipper applications to
Java (2.0) and, ultimately, Oracle. In the meantime, it is necessary to write Java applications that will talk to xBase tables. Windows (95-8) and NT provide an ODBC driver for FoxPro2.6 - which, by the way, can read Clipper tables easily enough.
When setting up an ODBC tag in Widows, I selected FoxPro2.6 (although I named it "Clipper")- and set the explicit location of files to a location on my PC where I placed a number of xBase tables.
Now - when executing the following code to
test the feasibility of this scheme:
// odbc stuff
import java.sql.*;
class myClipper
{
public static void main(
String[] args)
{
try
{
Class.forName("sun.jbdc.odbc.JdbcOdbcDriver");
String myDatabase = "jdbc
dbc:Clipper";
Connection con = DriverManager.getConnection(myDatabase, "","");
Statement stmt = con.createStatement();
String query = "SELECT * COMP_NA, TITLE FROM LIBRARY";
ResultSet rs = stmt.executeQuery(query);
while (rs.next() )
System.out.println( rs.getString("COMP_NA")+" "+rs.getString("TITLE") );
}
catch (ClassNotFoundException e)
{
System.out.println("\""+ e.toString()+"\"" );
}
catch (SQLException e)
{
System.out.println( "\""+e.toString()+"\"" );
}
}
}
When executing, I get the following error:
"java.lang.ClassNotFoundException: sun.jbdc.odbc.JdbcOdbcDriver"
Inasmuch as this is my first effort at
jdbc, I imagine I've
probably made every stupid mistake in the book - so please don't
laugh too loudly at this. Any thoughts. I'm all alone here - there are no local java types around to provide support.
Thanks-
Avrohom Leichtling