mayachoy
asked on
can't use getString to get char value
if (rst.getString("Inv_ItemMo delNo").eq uals("")) -----> if Inv_Type data type varchar den this statement is working
if (rst.getString("Inv_Type") .equals("" )) -----> if Inv_Type data type char den this statement is nt working (how to make this work?)
thks
if (rst.getString("Inv_Type")
thks
How about:
if (rst.getString("Inv_Type") == '')
That is 2 single quotes at the end.
If rs.getString is returning type char (java primitive) then you cannot perform a .equals operation on it, its not an object.
if (rst.getString("Inv_Type")
That is 2 single quotes at the end.
If rs.getString is returning type char (java primitive) then you cannot perform a .equals operation on it, its not an object.
ASKER
both way are nt working
on my jsp is still not working
on my jsp is still not working
What exception are you getting when the data type is char ?
if (String.valueOf(rst.getStr ing("Inv_T ype")).equ als("") )
ASKER
i had tried all the solution above still not working.
ASKER
if (!rst.getString("Inv_Type" ).equals(" OH"))
if (!rst.getString("Inv_ISOCo untryCode" ).equals(" ID"))
both inv_type and Inv_ISOCountryCode are char type
but inv_type is working on the if statement but Inv_ISOCountryCode is nt working in the if statemenet
is it because the field name too long? is it jsp got such limits? if yes how should i solve it?
thanks
if (!rst.getString("Inv_ISOCo
both inv_type and Inv_ISOCountryCode are char type
but inv_type is working on the if statement but Inv_ISOCountryCode is nt working in the if statemenet
is it because the field name too long? is it jsp got such limits? if yes how should i solve it?
thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
if (Character.toString(rst.ge