I have a form in which I have made File no =field which displays(From sql database) the Integer value like 1-2-3-4 and so on.
I want that ,when I save a form which has file no 1 ,and then after when I want to save the next record it should remember the last file no and increment by 1.
Right now it's showing me the last number that is after saving 2 number it is showing me 1 number with this code.
int fileno1=Integer.parseInt(Result.getString(2));//getting the last file no
filenotxtfield.setText(Integer.toString(fileno1 ++));//adding 1 to it and displaying it in the textfield.