java - "Type Mismatch: Cannot Convert from int to ResultSet" -


i using jcbc api connect mysql server in order perform sql queries (create tables, delete rows, etc.).

however, receive "type mismatch: cannot convert int resultset" error in following function:

private static void deleteunpopularartists(statement statement, int min_rank) throws sqlexception {      string rank = integer.tostring(min_rank);     resultset resultset = statement.executeupdate("delete record_artist high_chart_pos < " + rank + ";");  } 

i have tried use string.valueof(min_rank); , int rank = min_rank + "";

so question is, why getting error? can fix it?

executeupdate returns number of rows affected in query. notion of resultset database write operation makes no sense

int rows = statement.executeupdate      ("delete record_artist high_chart_pos < " + rank + ";"); 

Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -