Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 1st, 2005, 09:36 PM
Registered User
Join Date: Nov 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Ways to implment data maintenace in jsp

Dear All,

Can anyone tell me what is the ways of implementing the following operations:

Allow user to insert new row from jsp to database.
Database Table has 5 columns
User is able insert a blank row by pressing the button "Add Row", type in the data, and press the button "Save" to save all data to the database.


Reply With Quote
  #2 (permalink)  
Old January 4th, 2006, 06:28 AM
Registered User
Join Date: Dec 2005
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts


if u want to insert the blank row then u can set that field alone "allow nulls" in database.suppose u want to add new row in your database...u can use the following code...

      Connection cn=DriverManager.getConnection("jdbc:odbc:democms" ,"sa","sa");
      Statement st=cn.createStatement();
      String str1,str2;
       String query = "insert into democms1 values('"+str1+"','"+str2+"')";
       int rs=st.executeUpdate(query);
       if(rs!= 0)
             out.println("Entry successfully Inserted");
            out.println("Error! Please try again.");

its working..so try this one..
i dont know whether i am getting your question or not.....for my understanding, i am sending this...am i right?

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
The different ways to assgn an event handler cris9 Javascript 0 February 25th, 2007 09:32 AM
What r different ways of knowing values in Object? amit_mande@yahoo.com VB.NET 2002/2003 Basics 1 September 27th, 2006 02:48 PM
different ways of interfacing with MS Office chandler7272 C# 3 July 21st, 2006 03:52 PM
What are different ways to deploy VB on client mac Konan Beginning VB 6 0 July 10th, 2006 04:04 AM
different ways to login to a remote server phpsharma Linux 2 January 30th, 2004 07:03 AM

All times are GMT -4. The time now is 07:03 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.