I am getting this error in return resultset. cannot convert results from Resultset to double.
Isn't it possible to return a double? What should i do?
public double getBalance( String name )
{
ResultSet resultSet = null;
try
{
selectBalance.setString( 1, name ); // specify last name
// executeQuery returns ResultSet containing matching entries
resultSet = selectBalance.executeQuery();
while ( resultSet.next() )
{
resultSet.getDouble("balance");
} // end while
} // end try
catch ( SQLException sqlException )
{
sqlException.printStackTrace();
} // end catch
return resultSet;
}
Thx in advance!