Forums Register Login

data insertion probelm in jsp

+Pie Number of slices to send: Send
hi...
when im clicking the submit button the data from the text field gets entered into the database(thru beans).But the probelm is a null value is also getting stored for some wierd reason.What could be the reason for this.I have used request.getParameter to get the value from the textbox.
Please help..

Payal
+Pie Number of slices to send: Send
May be you are making some mistake in writing your parameter name. Better post code snippet.
+Pie Number of slices to send: Send
I think payal you should send your code,Then only we can tell tell you about the reason,why null values are inserted automatically.
Also,this can be due to Parameter Name mismatching.So just check and respond us.
+Pie Number of slices to send: Send
Is this null value gets stored in the same column as textfield value.
If null value is saved in different column then check the field name related to that column. As adeel and vijay mentioned there might be parameter mismatching.
+Pie Number of slices to send: Send
getParameter will return null if there isn't a parameter in the post who's name matches the string given.

IE: if you have a textfield named first_name in your form and you try to read it with request.getParameter("first-name"), a null will be returned.

Check your spelling and case.
I'm not sure if I approve of this interruption. But this tiny ad checks out:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 631 times.
Similar Threads
listbox
Reading a char from int
File not writing data to CSV file on XP
Help run a struts application
comparing a string value with a jtable value
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 02:04:12.