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 397,751 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 2,570 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

JSP connection to database

Join Date: Aug 2004
Posts: 8
Reputation: adityabakle is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
adityabakle adityabakle is offline Offline
Newbie Poster

Solution Re: JSP connection to database

  #2  
May 1st, 2005
Hi nelly

No need to do much
I hope u are aware of JDBC-ODBC Driver and they are supported by sdk1.4

First create a DSN using ODBC in control pannel
later for JSP to connect to Database

use the following code

<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn = DriverManager.getConnection("jdbc:odbc:<DSN name>")
%

provide DSN name after the second colon.
In this way you are connected to your data base and you can futher query your database using statement object .

For futher help
mail adityabakle@gmail.com
Reply With Quote  
All times are GMT -4. The time now is 3:26 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC