• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

storing dynamic row value to database

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my application i have a view page(html or jsp) with three field (name,address,roll no).i have one add button ,if i click on add button one java-script will be called and it will display a row in the same page with three column (name,address and roll no).whenever i will click on add button ,a new row will be added.Now i want to store these dynamic row's value to database (using servlet).How can i do this?
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Store it when? When the form is submitted? As soon as the row is added to the display? Please be more explicit in your questions. Read this for more information.
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i want to store when form is submitted.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What part are you having trouble with, retrieving parameters, JDBC?
 
sahid ul karim
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am having problem to store it in data base,because every column may have multiple rows.So how can i pass it to the servlet.
Ex:-
Name|Address|Roll no
sahid|blr|259
smith|ger|334
alex|swd|423

Now i want to pass these 3rows to the database through servlet.I know that for a value i can do it using request.getparameter("");but here the values are dynamic.How can i do it?
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How are the dynamic values being generated? Your param generator should produce names that the submitting servlet can deal with. One tactic could be to produce names that contain the row index. E.g. "name[0]" "name[1]" and so on. These are easily parsed on submission.
reply
    Bookmark Topic Watch Topic
  • New Topic