
- Forum
- Programming Talk
- Java
- Connecting to a Database
Connecting to a Database
This is a discussion on Connecting to a Database within the Java forums, part of the Programming Talk category; Database - JDBC (java.sql) Connecting to a Database This example uses the JDBC-ODBC bridge to connect to a database called ...
-
Connecting to a Database
Database - JDBC (java.sql)
Connecting to a Database
This example uses the JDBC-ODBC bridge to connect to a database called ''mydatabase' '.
try {
Class.forName( "sun.jdbc. odbc.JdbcOdbcDri ver");
String url = "jdbc : odbc:mydataba se";
Connection con = DriverManager. getConnection( url, "login", "password");
} catch (ClassNotFoundExcep tion e) {
} catch (SQLException e) {
}
Last edited by lokeshm; 12-13-2006 at 05:03 AM.
-
This example was very useful for connecting to database. But can you kindly explain me in detail what is JDBC-ODBC Bridge. I do not have detailed idea about this concept and its usage.

Reply With Quote





