I am trying to update with this code

Result.updateInt("bank_ac_no",Integer.parseInt(acnotxtfield.getText().trim()));
//this is the line I'm getting error.

Here is the Trace

java.lang.NumberFormatException: For input string: "2737383928291819"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.lang.Integer.parseInt(Integer.java:495)
    at java.lang.Integer.parseInt(Integer.java:527)

What's wrong?

Yes

 catch (SQLException | NumberFormatException e) 
          {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

Looks to me like that value is a valid integer, but its not a valid int because it's too big, >= 2^32. You could use a long instead of an int.

Edited 3 Years Ago by JamesCherrill

Do I have to change the Data type also for the column?Because

Result.updateLong("bank_ac_no",Integer.parseInt(acnotxtfield.getText().trim()));

updateLong instead of Int did not worked ,gave me the same error.

EDIT:I think I have also to change Long.parseLong :) It will work then .

Edited 3 Years Ago by chdboy

This question has already been answered. Start a new discussion instead.