Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Query for Insert data using JSP

 
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.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE 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.
 
Marshal
Posts: 67366
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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 .....
 
Let nothing stop you! Not even this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!