java jdbc中的Exhausted Resultset

时间:2014-05-01 12:40:48

标签: java oracle jdbc resultset

pst=con.prepareStatement("Select * from stu_extra where stu_id like 'Kul7Dub514'");
rs=pst.executeQuery();
while(rs.next())
{
    stclasscombo.setSelectedItem(rs.getString(2));
    for(int i=3;i<10;i++)
        System.out.println(rs.getString(i));
    if(rs.getString(10).equals("PCM"))
    {
        PCM.setSelected(true);
    }
    else if(rs.getString(10).equals("PCB"))
    {
        PCB.setSelected(true);
    }
    else  if(rs.getString(10).equals("PCMB"))
    {
        PCMB.setSelected(true);
    }
    if(rs.getString(11).equals("true"))
    {
        NEET.setSelected(true);
    }
    if(rs.getString(12).equals("true"))
    {
        IPCC.setSelected(true);
    }
    act_fee.setText(Integer.toString(rs.getInt(13)));
    conc.setText(Integer.toString(rs.getInt(14)));
    tot_fee.setText(Integer.toString(rs.getInt(15)));
    no_instl.setText(Integer.toString(rs.getInt(16)));
}

代码返回时出现结果集错误 获得第一个值 即第2栏 但是没有检索到后面的值 请帮忙......

0 个答案:

没有答案