这个读身份证的为什么总是只能读取同一个人的数据?
Database db=Database.open(new File(""+saveDirectory+"/ssid.mdb"));
Table tab=db.getTable("citizen");
List<String> col=new ArrayList<String>();
col.add("Name");
col.add("sex");
col.add("Folk");
col.add("BirthDay");
col.add("Address");
col.add("NewAddress");
col.add("IDCardNum");
col.add("IssueOrgan");
col.add("AvailabilityBegin");
col.add("AvailabilityEnd");
Map<String,Object> map1=tab.getNextRow(col);
System.out.println("name="+map1.get("Name"));
System.out.println("sex="+map1.get("sex"));
System.out.println("nation="+map1.get("Folk"));
System.out.println("birthday="+map1.get("BirthDay"));
System.out.println("address="+map1.get("Address"));
System.out.println("newaddress="+map1.get("NewAddress"));
System.out.println("department="+map1.get("IssueOrgan"));
System.out.println("AvailabilityBegin="+map1.get("AvailabilityBegin"));
System.out.println("AvailabilityEnd="+map1.get("AvailabilityEnd"));
name=map1.get("Name").toString();
sex=map1.get("sex").toString();
nation=map1.get("Folk").toString();
birthday=map1.get("BirthDay").toString();
address=map1.get("Address").toString();
idcard=map1.get("IDCardNum").toString();
}catch(Exception e)
{
errMsg=e.getMessage();
System.out.println(e);
}
System.out.println("读取ACESS数据..END.");
//转换图片格式
System.out.println("转换图片格式...");
try{
File _file = new File(saveDirectory+"/b.bmp"); //读入文件
Image src = javax.imageio.ImageIO.read(_file); //构造Image对象
int wideth=src.getWidth(null); //www.8892.org得到源图宽
int height=src.getHeight(null); //得到源图长
BufferedImage tag = new BufferedImage(wideth,height,BufferedImage.TYPE_INT_RGB);
tag.getGraphics().drawImage(src,0,0,wideth,height,null); //绘制缩小后的图
FileOutputStream output=new FileOutputStream(saveDirectory+"/photo/"+passengercode+".jpg"); //输出到文件流
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(output);
encoder.encode(tag); //近JPEG编码
//System.out.print(width+"*"+height);
}catch(Exception ex)
{
System.out.println(ex);
}
System.out.println("最终图片地址:"+saveDirectory+"/lk.jpg");
System.out.println("转换图片格式..END.");
当用读其他数据时候,
最终出来的还是第一个人的数据
谢谢大哥men啊
------解决方案--------------------
完全没有细看的兴趣。。。粗略的瞄了眼、没有循环?