This is an old revision of the document!
</code JAVA> import java.io.*; import java.sql.*; public class OdxTestConnection {
static public void main(String args[])
{
Connection odxconnection = null;
try
{
Class.forName("omnidex.jdbc.OdxJDBCDriver");
}
catch ( ClassNotFoundException ce )
{
ce.printStackTrace();
return;
}
try
{
odxconnection = DriverManager.getConnection
("jdbc:omnidex:c:\\dev\\odx\\tiny\\tiny.dsn");
System.out.println("Omnidex JDBC Connection successful!");
// Do SELECTS here
}
catch (SQLException e)
{
e.printStackTrace();
}
finally
{
if (odxconnection != null )
{
try { odxconnection.close(); }
catch( SQLException e )
{
e.printStackTrace();
}
}
}
} // end main
} end class </code>