I am into a project wherein i am required to make a form in which a user enters the details and the same gets updated in database. the table structure is as follows:
Month MS_TARGET HSD_TARGET ALPG_TARGET LUBES_TARGET TYRES_TARGET
APRIL
MAY
JUNE
JULY
AUGUST
SEPTEMBER
OCTOBER
NOVEMBER
DECEMBER
JANUARY
FEBRUARY
MARCH
I have months on Y axis and Certain Target fields on X axis.I have total of 60 fields.
I want to iterate through all the fields and insert the same in the database.I thought of using hashmap. according to my knowledge i created hashmap column wise.
eg:
HashMap <string,> MS_Target= new HashMap <string,>();
MS_Target.put("April",new Integer(1));
MS_Target.put("May",new Integer(2));
MS_Target.put("June",new Integer(3));
MS_Target.put("July",new Integer(4));
MS_Target.put("August",new Integer(5));
MS_Target.put("September",new Integer(6));
MS_Target.put("October",new Integer(7));
MS_Target.put("November",new Integer(8));
MS_Target.put("December",new Integer(9));
MS_Target.put("January",new Integer(10));
MS_Target.put("February",new Integer(11));
MS_Target.put("March",new Integer(12));
like wise for all columns.total i have 5 hashmap. My concern is how do i insert the hashmap data in my database....Any help would be highly appreciated as i am a newbie to jsp .....