Type mismatch: Cannot convert from String to int.
It may be that the string contains characters other than numbers. According to this part of the code, it may be that the AmainID column in the table contains non-numeric characters, so it cannot be converted into integers.
-
Sorry, I didn't read this sentence carefully.
GID = string . value of(RS . getint(" amai NID "));
Gid is an Int, and rs.getInt () itself returns an int, so it is direct.
GID = RS . getint(" amai NID ");
Do it.
Because String.valueOf () returns a string type, the original statement completely assigns the string to the int variable, so an error will occur.