File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Query for Insert data using JSP 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 » Databases » JDBC
Bookmark "Query for Insert data using JSP " Watch "Query for Insert data using JSP " New topic
Author

Query for Insert data using JSP

Sri Gnana
Ranch Hand

Joined: Apr 29, 2004
Posts: 166
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.


Thanks & Regards
Sri Gnana
Everythings Programmed!...
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

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.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61596
    
  67

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Sri Gnana
Ranch Hand

Joined: Apr 29, 2004
Posts: 166
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 .....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Query for Insert data using JSP