How to populate the dropdown list from sql server database using LinkedHashMap in java
In SQL Server database I have a table which has three columns namely Ref_Name,Ref_from and Ref_to.Now I want a dropdown list to hold values row-wise i.e all column values of the row should be in the dropdown list in following way:- Reference-1(2014-10-10 07:17:00.000 to 2014-10-10 08:46:00.000) Reference-2(2014-09-01 10:00:00.000 to 2014-09-01 11:00:00.000) For this I have used LinkedHashMap as:- public LinkedHashMap<String, List<String>> connect() { ArrayList<String> list = new ArrayList<String>(); try { con = getConnection(); stmt = con.createStatement(); String sql="select Ref_No,From_Date