| 发表于:2007-07-30 10:25:371楼 得分:0 |
数组不好用,还不如返回list(其中元素为hashtable--[字段名,值]) hashtable item = null; arraylist list = new arraylist(); while(rs.next()) { item = new hashtable(); item.put( "field_a ", rs.getstring(0)); item.put( "field_ba ", rs.getstring(1)); item.put( "field_c ", rs.getstring(2)); list.add(item); } return list; | | |
|