User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 391,922 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,715 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 520 | Replies: 4 | Solved
Reply
Join Date: Jul 2008
Posts: 1
Reputation: kavit.bhatt is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
kavit.bhatt kavit.bhatt is offline Offline
Newbie Poster

Connection to database

  #1  
Jul 9th, 2008
how to make a connection url string using DSN
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,141
Reputation: peter_budo has a spectacular aura about peter_budo has a spectacular aura about peter_budo has a spectacular aura about 
Rep Power: 10
Solved Threads: 258
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is online now Online
Code tags enforcer

Re: Connection to database

  #2  
Jul 9th, 2008
Google my friend is what you should do, like this
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

If we helped you to solve your problem, answered your question please mark your post as SOLVED.
Reply With Quote  
Join Date: Nov 2004
Location: Netherlands
Posts: 5,646
Reputation: jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough 
Rep Power: 18
Solved Threads: 191
Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Connection to database

  #3  
Jul 9th, 2008
but what the heck does this have to do with JSP?
DSN is an ODBC concept, and has no relation to Java whatsoever.
It's also an utterly outdated concept for for example .NET.
42 Private messages asking for help will be ignored
In the frozen land of Nador they were forced to eat Steve's iMinstrels, and there was much rejoicing.
Reply With Quote  
Join Date: Jul 2008
Posts: 1
Reputation: kusha25 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
kusha25 kusha25 is offline Offline
Newbie Poster

Re: Connection to database

  #4  
32 Days Ago
Originally Posted by kavit.bhatt View Post
how to make a connection url string using DSN

You can use these two lines for connection using DSN
  1. Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
  2. Connection con=DriverManager.getConnection("jdbc:odbc:dsn");
here i am using type 1 driver for connectivity.
Last edited by peter_budo : 32 Days Ago at 3:40 pm. Reason: Keep It Organized - please use [code] tags
Reply With Quote  
Join Date: Jan 2008
Posts: 12
Reputation: senthil_sivanat is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
senthil_sivanat senthil_sivanat is offline Offline
Newbie Poster

Re: Connection to database

  #5  
28 Days Ago
This sample code connects from DB2 to WSAD .

<URL REMOVED>
Last edited by peter_budo : 28 Days Ago at 2:58 pm. Reason: Keep It Spam-Free - Do not spam, advertise, plug your website, or engage in any other type of self promotion.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JSP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the JSP Forum

All times are GMT -4. The time now is 8:17 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC