aspose file tools*
The moose likes JSF and the fly likes values from users show null when entered into database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "values from users show null when entered into database" Watch "values from users show null when entered into database" New topic
Author

values from users show null when entered into database

Yahya Arshad
Greenhorn

Joined: May 15, 2011
Posts: 26
Hi i am using mySQL with jsf i have a problem when i hit submit button after filling out form the database fill with null values instead of values that i enter in form...

here is my managedBean



here is my Sql Query

i have also tried using this.dob , this.getDob() , dob, but the value goes in database is always null...

here is my full action which invoked on press of submit button



if i put values in query my self instead of taking from user it works fine..

please help me
Bobby Smallman
Ranch Hand

Joined: Sep 09, 2010
Posts: 107
Have you double checked that the Dob string is actually set when you are forming the query string? Perhaps you are having a problem prior to the query since you have tested the same query with manually entered data.


Everyday in every way, we get a little better.
Cristian Adinanda
Greenhorn

Joined: Jun 24, 2011
Posts: 9

Bobby Smallman wrote:Have you double checked that the Dob string is actually set when you are forming the query string? Perhaps you are having a problem prior to the query since you have tested the same query with manually entered data.



i agree, please debug it first for the this.getDob() to make sure it parse String that have non-value .
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: values from users show null when entered into database