aspose file tools*
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 JavaScript Promises Essentials this week in the JavaScript 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: 42591
    
  65
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: 42591
    
  65
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