日期:2014-05-20 浏览次数:20699 次
Vector sbVec = new Vector();
try {
PreparedStatement statement0 = ct.prepareStatement("select *" +
"from tblGoods where GSORT='"+sortSearch+"' ");
rs=statement0.executeQuery();
StringBuffer strb=new StringBuffer();
int rsnextcount=0;
while(rs.next()){
rsnextcount+=1;
strb.delete(0, strb.length());
strb.append(rs.getString(2)+"\t"+"\t" +"¥"+rs.getString(5)+"\t"+rs.getString(3)+"\t"+rs.getString(6)+"\t"+ "\n");
System.out.println("rs.next count is \n"+rsnextcount);
System.out.println("now strb is "+strb);
//sbVec.addElement(strb);
sbVec.add(strb);
}
for(int i=0;i<5;i++){
//System.out.println("still right before print vector");
System.out.println("sbVec"+i+" is "+sbVec.get(i));
}
} catch (Exception e) {
e.printStackTrace();
}
return sbVec;
Vector sbVec = new Vector();