To obtain an ODBC connection, creating a DSN is not always necessary. It can be done in the following way for sybase iq db:

String url = "jdbc:odbc:Driver={Sybase IQ};Compress=NO;" +

Connection con = DriverManager.getConnection(url, <USERNAME>,

Same can be done with most of the databases. But the property names differ for different databases. Best way to find out the property names is to create a File DSN from the ODBC administrator. The DSN file created will have the property names that can be used in the connection string.