经检查,错误由于从数据库读取的字符串为" ",而用interger转型为int出错....
转换之前数据最好加一个校验.
String sql13= "select code1,codealias,othersign from ldcode1 where codetype='checkidtype' and code='"+idtype+"'";s1=meExeSQL.execSQL(sql13);String othersign=s1.GetText(1, 3); int first=Integer.parseInt(s1.GetText(1, 1));String codelias=s1.GetText(1, 2);if(!("".equals(codelias)||codelias==null)){int two=Integer.parseInt(s1.GetText(1, 2));if("double".equals(othersign)){if(idno.length()!=first&&idno.length()!=two){error="录入的证件号码有误,请检查!!";writeerror(error, prtno);return false;}}if("between".equals(othersign)){if(idno.length()<first||idno.length()>two){error="录入的证件号码有误,请检查!!";writeerror(error, prtno);return false;}}}
.