我在返回结果集中收到此错误。 无法将结果集的结果转换为 double。
是不是可以返回双倍?我应该怎么办?
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;
}
提前谢谢!