Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 27th, 2007, 01:39 AM
Registered User
 
Join Date: Mar 2007
Location: Kathmandu, , Nepal.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Database connection with SQL Server

I want to connect jsp page with database in MS SQL Server. Can anyone plz help me out with this?

I am a new to JSP.

Reply With Quote
  #2 (permalink)  
Old May 4th, 2007, 11:20 PM
Authorized User
 
Join Date: Aug 2005
Location: , , .
Posts: 64
Thanks: 0
Thanked 0 Times in 0 Posts
Default

first u've 2 create a DSN of ur database in ODBC
for example the DSN name is "mydb"
now in ur JSP page, import the java.sql.* package, and then...
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:mydb");

Reply With Quote
  #3 (permalink)  
Old May 28th, 2007, 02:19 AM
Authorized User
 
Join Date: May 2007
Location: , , .
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default

find more at
http://find more@<br /> <br /> htt.../jdbc_api.html

http://studyjava.org/forums/
Reply With Quote
  #4 (permalink)  
Old May 29th, 2007, 04:39 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Hyderabad, A.P., India.
Posts: 373
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi,

Quote:
quote:Originally posted by kanoorani
 first u've 2 create a DSN of ur database in ODBC
for example the DSN name is "mydb"
now in ur JSP page, import the java.sql.* package, and then...
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:mydb");
You cann't use JDBC ODBC bridge at enterprise level.
Find information about how to connect to MS SQL Server using JDBC at the following URLs

http://www.akadia.com/services/sqlsrv_jdbc.html
http://www.java-tips.org/other-api-t...sing-jdbc.html
http://msdn2.microsoft.com/en-us/data/aa937724.aspx
http://support.microsoft.com/kb/313100

Regards,
Rakesh
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Server Connection and Database Problem workib C# 1 November 13th, 2008 03:26 PM
IIS server, connection to offsite database server Hazzardusa Classic ASP Databases 1 August 14th, 2005 10:03 PM
Server error for database connection frankv25 ASP.NET 1.0 and 1.1 Basics 5 August 14th, 2004 07:33 AM
Cannot add database connection in server explorer bbhill VS.NET 2002/2003 1 June 30th, 2003 09:14 PM



All times are GMT -4. The time now is 04:46 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.