tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uma Maheswar" <>
Subject integer value
Date Mon, 25 Feb 2002 16:31:36 GMT
I have a doubt, I have a form that has name and his phone number, both the fields are optional.
I declared name as VARCHAR and number as INTEGER in my SQL database. When the user leaves
the fild empty, I get an error with the number field as NumberFormatException. 

So , What I need to do now is, when the user leaves the field null or blank, I wanted to insert
a default value into the database. For eg.

If(number == null)
    number = 000000;

I know the number if statement will give error.But could you please help me with this?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message