This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes How JSP Connect MS SQL server 2005 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "How JSP Connect MS SQL server 2005" Watch "How JSP Connect MS SQL server 2005" New topic
Author

How JSP Connect MS SQL server 2005

Chua Keng Guan
Greenhorn

Joined: Oct 11, 2006
Posts: 10
Can anyone teach me how to connect to MS SQL server 2005 using JSP Please...
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41134
    
  45
First you should get a JDBC driver for SQLServer, like this one from Microsoft. That page also describes how to use it.

Note that it is considered bad design to perform DB operations directly in JSP code. You should consider moving the DB access to Java beans that you reference from the JSP.


Ping & DNS - my free Android networking tools app
Chua Keng Guan
Greenhorn

Joined: Oct 11, 2006
Posts: 10
after download the JDBC Drive. where should i put. and how the code to create a connection to the database. thank for your advise but need to try it out to see the out come.
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
A JDBC question, I believe.
Chua Keng Guan
Greenhorn

Joined: Oct 11, 2006
Posts: 10
Then where to put the JDBC driver... and how the code is for connecting to the database using JSP.. thank you. it is very important to my project. THANKS
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41134
    
  45
Did you read the various pages that are linked from the one I posted? They explain in detail how to set up the driver and how to write code that uses it. If you are unsure about JDBC itself, work through the JDBC chapter of the Java tutorial.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How JSP Connect MS SQL server 2005
 
Similar Threads
connect jsp to sql server 2005
Connecting to SQL Server 2000
JDBC to MS SQL Server
help with ms sql server 2005
Trigger with Two database