Problem with Multiple String comparision
[nobr]Iam sending some values to another page where updation talkes place
In this update page Iam comparing the string values i.e the existing values with the entered ones in the first page.
If both are equal then updation won't take place or else it will update.
Problem is when only one value is changed in the first page , it should update as it is an OR condition
but updation doesn't happen here.If I change all the three variables then updation happens.
How can I update when a single variable is changed in the first page.
String implemented_suggestions1,suggestion_registered_no1,remarks1;
String implemented_suggestions[],suggestion_registered_no[],remarks[];
for(int k=0;k<rowid.length;k++)
{
x="select implemented_suggestions,SUGGESTION_REGISTERED_NO,REMARKS from EMP3 where and rowid='"+rowid[k]+"' ";
rsx=stx.executeQuery(x);
if(rsx.next())
{
implemented_suggestions1 = rsx.getString(1);
suggestion_registered_no1 = rsx.getString(2);
remarks1 = rsx.getString(3);
//Comparision between String and String array
if(implemented_suggestions1.equals(implemented_suggestions[k]) || suggestion_registered_no1.equals(suggestion_registered_no[k]) || remarks1.equals(remarks[k]))
{
out.println("><BR>NOT UPDATED<BR>");
}
else
{
y="update EMP3 set IMPLEMENTED_SUGGESTIONS='"+implemented_suggestions[k]+"',SUGGESTION_REGISTERED_NO='"+suggestion_registered_no[k]+"',REMARKS='"+remarks[k]+"',DATE_OF_UPDATE=to_date(sysdate,'dd/mm/yy') where rowid='"+rowid[k]+"'" ;
z=st.executeUpdate(y);
if (z==1)
{
out.println(" updated Successfully");
}
else
{
out.println("not updated");
}
}
}
}//END OF FOR
[/nobr]

