Freigeben über


IResultSet.Next Method

Definition

Moves the cursor froward one row from its current position.

[Android.Runtime.Register("next", "()Z", "GetNextHandler:Java.Sql.IResultSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool Next ();
[<Android.Runtime.Register("next", "()Z", "GetNextHandler:Java.Sql.IResultSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Next : unit -> bool

Returns

true if the new current row is valid; false if there are no more rows

Attributes

Exceptions

if a database error happens.

Remarks

Moves the cursor froward one row from its current position. A ResultSet cursor is initially positioned before the first row; the first call to the method next makes the first row the current row; the second call makes the second row the current row, and so on.

When a call to the next method returns false, the cursor is positioned after the last row. Any invocation of a ResultSet method which requires a current row will result in a SQLException being thrown. If the result set type is TYPE_FORWARD_ONLY, it is vendor specified whether their JDBC driver implementation will return false or throw an SQLException on a subsequent call to next.

If an input stream is open for the current row, a call to the method next will implicitly close it. A ResultSet object's warning chain is cleared when a new row is read.

Java documentation for java.sql.ResultSet.next().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to