Exforsys

Free Training

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 ...

Go Back   Exforsys > Programming Talk > Java

Exforsys.com

  #1 (permalink)  
Old 12-13-2006, 05:00 AM
Senior Member
 
Join Date: Apr 2005
Posts: 721
lokeshm is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-07-2007, 08:09 AM
Senior Member
 
Join Date: Apr 2006
Posts: 144
caradoc is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

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 05:15 AM
FAQ: How to find people's E-mail addresses David Alex Lamb Tech FAQ 0 05-02-2004 05:30 AM
Comp.software-eng FAQ (Part 0): periodic postings and archives David Alex Lamb Tech FAQ 3 04-18-2004 05:15 AM
Kerberos FAQ, v2.0 (last modified 8/18/2000) Ken Hornstein Tech FAQ 0 04-17-2004 07:28 AM
[FAQ] FileMaker Pro - database for Macintosh and Windows Martin Trautmann Tech FAQ 0 04-17-2004 07:26 AM


All times are GMT -4. The time now is 03:13 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0
Copyright 2004 - 2009 Exforsys Inc. All rights reserved.