chaddu1256
IS-IT--Management
<%
//to test for null values
String va5 = "";
if (request.getAttribute("meterNo").toString().equals("00000000")){
va5 = " ";
}
else{
va5 = request.getAttribute("meterNo").toString();
}
%>
This is the statemenet I have at the moment. Basically there is a database entry that is either going to have a random 8 number digit, or all 0's. Right now if the database entry is all 0's then a blank space is used, Otherwise the actual 8 digit number is used. Found out today that there is another value that can be in the database and that is "null". I need to modify this statement to basically say if the request.getAttribute(meterno) is either 00000000 or null then use a blank space. Can anyone help me modify this statement to include the check for "null"
//to test for null values
String va5 = "";
if (request.getAttribute("meterNo").toString().equals("00000000")){
va5 = " ";
}
else{
va5 = request.getAttribute("meterNo").toString();
}
%>
This is the statemenet I have at the moment. Basically there is a database entry that is either going to have a random 8 number digit, or all 0's. Right now if the database entry is all 0's then a blank space is used, Otherwise the actual 8 digit number is used. Found out today that there is another value that can be in the database and that is "null". I need to modify this statement to basically say if the request.getAttribute(meterno) is either 00000000 or null then use a blank space. Can anyone help me modify this statement to include the check for "null"