パッケージクラスを使用して変換時にエラーを報告するjava.lang.NumberFormatException: For input string: ""
918 ワード
データベースから読み出す文字列が「」であるため、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()two){
error=" , !!";
writeerror(error, prtno);
return false;
}
}
}
.