stm =con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
					rs=stm.executeQuery(qry);
rs.last();
String s=rs.getString(1);

I have backend as sybase.
But above code is throwing an error as follows:

Error [Sybase][ODBC Driver][Adaptive Server Enterprise]HEADERFORMAT1 not found. Specify owner.objectname or use sp_help to check whether the object exists (sp_help may produce lots of output)

First we need what is in your "qry" variable.
Also if you want is use features like rs.last() etc, then I recommend you use a scroll insensitive resultset.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.