I have a form field where user enters the price of something and I need to access that form value and save it to my MSSQL table into a FLOAT field. I keep receiving errors like:
---------------------------------------
java.lang.NullPointerException
at java.lang.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:983)
---------------------------------------
<!---form page--->
<input type="text" size="8" name="price">
<!---process page--->
try {
price = Double.parseDouble(request.getParameter("price");
}
catch (NumberFormatException nx) { price= 0.0D; }
Any help please....
Thanks
---------------------------------------
java.lang.NullPointerException
at java.lang.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:983)
---------------------------------------
<!---form page--->
<input type="text" size="8" name="price">
<!---process page--->
try {
price = Double.parseDouble(request.getParameter("price");
}
catch (NumberFormatException nx) { price= 0.0D; }
Any help please....
Thanks