> 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. 

If you really want to do it this way, you can catch the exception (see a book on Java) 
and set it there.

Better still, don't try to force the data into an integer field, cos it isn't really.  
You can check that it is only made of certain characters (0-9) instead.

J.
-- 
You're only jealous cos the little penguins are talking to me. 



***************************************************************
For more information on Ordnance Survey products and services,
visit our web site at http://www.ordnancesurvey.co.uk
***************************************************************




--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to