Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Query for Insert data using JSP

 
Sri Gnana
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm using MSaccess, the table having 10 fields, but i want to insert data into 6 fields, can any one tell me how to do in JSP, please give me the sample code.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't do DB interaction in JSP. The technology you want is JDBC. You probably won't get any sample code here - asking for people to write code for you is frowned upon here. However, have a look at the JDBC tutorial on Sun's site, and get back to us if you have any problems.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whether you do this in a JSP (but you should never ever structure a program such that DB access is done in a JSP) or a "regular" Java class (like a servlet or standalone application) is moot. The JDBC code to perform an insert operation will be the same.

As Paul pointed out, learning JDBC via a tutorial is your best bet. Then when you write some code, you can ask specific questions on the parts of it that you are having any trouble with.
 
Sri Gnana
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Paul Sturrock & Bear Bibeault
Sorry !, I didn't ask you to write the code for me ok, if you have any website reference, just give it to me,otherwise just leave it, anyway thanks for your advice??? you know, around three Questions i have posted in JSP & JDBC Forum(only the code where i'm getting the error) related to this ,() i got some good response(thanks to all), i have tried it with that changes, but unfortunately the code's not working , so, finally i decide to ask help for the sample code, again i'm telling you i'm not asking you to write the code for me, , i think no one will ask like that , please dont hurt .....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic