about rs.last () error reporting

When writing to the statements rs.last() and rs.beforeFirst() that are used when querying data from a database, these methods return an error because Microsoft SQL does not have this method and requires additional statements to be added.

String SQL =”select * from stu_info”;// query key code
PreparedStatement PSTMT = dbConn. PrepareStatement (SQL,
the ResultSet. TYPE_SCROLL_INSENSITIVE, ResultSet. CONCUR_READ_ONLY); .
ResultSet rs = PSTMT executeQuery ();
 
Add the key code for the scarlet letter, and rs.last() will work.
However, the ResultSet.CONCUR_UPDATETABLE in the reference article will return an error. I don’t know why…
Refer to the article links: https://blog.csdn.net/pzasdq/article/details/52602730
 


Read More: