Click here to Skip to main content
15,896,118 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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:
Java
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 .....
Posted
Updated 14-May-12 18:24pm
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900