Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS 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
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

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: 67451
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 .....
 
We've gotta get close enough to that helmet to pull the choke on it's engine and flood his mind! Or, we could just read this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic