• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How JSP Connect MS SQL server 2005

 
Chua Keng Guan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone teach me how to connect to MS SQL server 2005 using JSP Please...
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Chua Keng Guan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A JDBC question, I believe.
 
Chua Keng Guan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic