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 ...
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 06:03 AM. |
![]() |
| Thread Tools | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Comp.software-eng FAQ (Part 0): periodic postings and archives | David Alex Lamb | Tech FAQ | 2 | 05-23-2004 06:15 AM |
| FAQ: How to find people's E-mail addresses | David Alex Lamb | Tech FAQ | 0 | 05-02-2004 06:30 AM |
| Comp.software-eng FAQ (Part 0): periodic postings and archives | David Alex Lamb | Tech FAQ | 3 | 04-18-2004 06:15 AM |
| Kerberos FAQ, v2.0 (last modified 8/18/2000) | Ken Hornstein | Tech FAQ | 0 | 04-17-2004 08:28 AM |
| [FAQ] FileMaker Pro - database for Macintosh and Windows | Martin Trautmann | Tech FAQ | 0 | 04-17-2004 08:26 AM |