In Oracle table some fields are "null".By default it will show as "null" in JSP page text box.But i dont want that. I want as blank textbox.What i can do for that?

Showing Answers 1 - 5 of 5 Answers

Nagendra Prasad M

  • Oct 24th, 2005
 

hey

In Oracle table some fields are "null".By default it will show as "null" in JSP page text box.But i dont want that. I want as blank textbox.What i can do for that?

  Was this answer useful?  Yes

Sandya

  • Oct 25th, 2005
 

When retriving data from database itself, if u use NVL(filed,' ') then the field value shows the spaces.

  Was this answer useful?  Yes

Well for that, u need to write a small code segment which will check for the Null value and if NULL value is found then a space will be inserted in the respective Text Box else the value.

  Was this answer useful?  Yes

ejazazeem79

  • Dec 9th, 2005
 

one way is to use NVL(fieldName, ' ') in the SQL Query and the other one is to use ?: operator in java/jsp/servlet while get value from Resultset i.e.    (fieldName == null)? " " : fieldName;

  Was this answer useful?  Yes

umasank

  • Feb 17th, 2006
 

you can use the  wasNull() method of ResultSet to find if the column read in the table has a NULL and then set the bean value as you want.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions