Hi,
In HTML Form(Add data) in which I have text box,radio,checkbox, etc .And I am reading getting form data and putting it in mysql database using prepareStatement. and I have another form(view data) in which I am fetching data from database and displying it on view data form using Resultset.
I am having following problems
1) If any one of the form field are empty the getParameter() returns Null and it saves null into database but when I try to fetch data from database which is null , I am getting Null pointer exception.
How to handle this?
2)I have one Date field and another DateTime filed in mysql database. While storing data using preparedstatement is stores DateTime and DAte values but while retriving from date using Resultset which has only getDate() method it truncates the time part from datetime field.
I also like to know how to convert String to float and Long.
any help in these problem are greatly appreciated.
Thanks,
Padmashree
In HTML Form(Add data) in which I have text box,radio,checkbox, etc .And I am reading getting form data and putting it in mysql database using prepareStatement. and I have another form(view data) in which I am fetching data from database and displying it on view data form using Resultset.
I am having following problems
1) If any one of the form field are empty the getParameter() returns Null and it saves null into database but when I try to fetch data from database which is null , I am getting Null pointer exception.
How to handle this?
2)I have one Date field and another DateTime filed in mysql database. While storing data using preparedstatement is stores DateTime and DAte values but while retriving from date using Resultset which has only getDate() method it truncates the time part from datetime field.
I also like to know how to convert String to float and Long.
any help in these problem are greatly appreciated.
Thanks,
Padmashree