i have written a method in java like this
public boolean ADD(String ID,String Name,String Address)
{
// This function execute a sql query and save a recrod in database.
}
I am calling this mwthod by a servlet like this.
String vId=(request.getParameter("txtID")).trim();
String vName=(request.getParameter("txtName")).trim();
String vAddress=(request.getParameter("txtAddress")).trim();
ADD(vId,vName,vAddress);
The problem is from first servlet i want to fill only ID not name and address.
It create a session using ID and by second servlet i want fill remaning fields.
but by first servlet it fills ID and empty in remaning fields.
So my question is it good to fill by null or empty remaining fields.
If not provide a good solution.
Thanks in advance
The empty value means that you have never inserted here any value.
The null means that you have inserted a value and for some reasons that value is null. Anyway you can use the null-check before the insert or after the select.