All,
I can't seem to find anything on the web about how to connect to a LibreOffice database. I am currently using the following code to connect to a MS Access database and would like to know how to change it to work with LibreOffice.
String strConnect =
"jdbc:odbc:DRIVER=Microsoft Access Driver (*.mdb, *.accdb);DBQ=C:\\db\\myDatabase.mdb;";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection(strConnect, "","");
if (null == con)
{
System.out.println("Unable to connect to data source " + strConnect);
return;
}
System.out.println("Successfully connected to database. Data source name:\n"
+ con.getMetaData().getURL() + "\n");
Thanks,
Bill