Hello everybody,

I am new to java programming.

Actually I have designed a form in which I have 5 fields & a submit and add button.
My requirement is that I need to save 100 data in database, but at a time I can enter only 1 set of data. And as it is not nice to make connection with database each time i.e 100 time.
I need that each time i enter data it should be stored some where and finally submit into database together.

Any kind of help shall be appreciated.
Thanks.

This is a standard requirement, with a standard solution. Briefly:
Create a class to hold your data, with 5 instance variables corresponding to the 5 fields.
When the user presses "submit" create a new instance of the class, using the values from the fields.
Define an ArrayList tto hold those class instances. Add each instance to the ArrayList as it's created.
Write a method that takes the whole ArrayList and writes its contents to the database. Call this once when all the instances are ready.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.