while(rs.next()){
String res=rs.getString("xxx");
Out.println(res);}

解决方案 »

  1.   

    while(rs.next()){
                line_str=",";
                for(i=1;i<=fields;i++)
                {
                   String   sColName = rs.getString(i);
                   sColName = sColName + line_str;
                   }
              sColName = sColName + "\r\n";  
              out.write(sColName);
    }
      

  2.   

    to keen_9:
       这么写只是把一列的数据按行输出了,其他的两列记录没有输出呀,谢谢!!!