Exforsys

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


Go Back   Exforsys > Programming Talk > Java

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-13-2006, 06:00 AM
Senior Member
 
Join Date: Apr 2005
Posts: 716
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 06:03 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-07-2007, 09: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

Thread Tools

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


All times are GMT -4. The time now is 07:01 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2004 - 2007 Exforsys Inc. All rights reserved.