公共哈希表> getdata(字符串查询)引发异常{
记录集记录= connection.executeQuery(query);
ArrayList字段名称= records.getFieldNames();
Hashtable> rec = new Hashtable>();
//records.moveFirst();
int计数器= 0;
同时(records.next()){
int size = fieldnames.size();
哈希表值= new Hashtable();
为(int i = 0; i 输出为: {TCNo = 1,标志= Y,ExcelName = Excel1,TestCaseScenrio = Scenario1}
{TCNo = 2,Flag = Y,ExcelName = Excel2,TestCaseScenrio = Scenario2} values.put(fieldnames.get(i), records.getField(fieldnames.get(i)));
}
System.out.println(values);
rec.put(counter, values);
counter++;
}
return rec;