JDBC connection

Reply

Join Date: May 2004
Posts: 3
Reputation: HiTleR83 is an unknown quantity at this point 
Solved Threads: 0
HiTleR83 HiTleR83 is offline Offline
Newbie Poster

JDBC connection

 
0
  #1
May 6th, 2004
Im new to java programming.
I want to establish a connection to
my MS-sql database using java.
How do i do it?
Reply With Quote Quick reply to this message  
Join Date: May 2004
Posts: 2
Reputation: hakeem46 is an unknown quantity at this point 
Solved Threads: 0
hakeem46 hakeem46 is offline Offline
Newbie Poster

Re: JDBC connection

 
0
  #2
May 20th, 2004
First declare your URL (in string format of cours
Remember your URL is
1 a String
2 "jdbc:odbc:"+dataSourceName;

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver")//often the standard;
Connection con = DriverManager.getConnection(url,"username","password");
Statement stmt = con.createStatement();

this is as far as connection goes
Reply With Quote Quick reply to this message  
Join Date: Feb 2003
Posts: 793
Reputation: Paladine has a spectacular aura about Paladine has a spectacular aura about Paladine has a spectacular aura about 
Solved Threads: 27
Team Colleague
Paladine's Avatar
Paladine Paladine is offline Offline
Master Poster

Re: JDBC connection

 
0
  #3
May 20th, 2004
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver")//often the standard;
Case Sensitive
Assistant Manager, Pharmacy Informatics
Wordpress Learning Blog
Updated : ASP.Net Login Code
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC