--- title: "isFirst Method (SQLServerResultSet) | Microsoft Docs" ms.custom: "" ms.date: "01/19/2017" ms.prod: sql ms.prod_service: connectivity ms.reviewer: "" ms.technology: connectivity ms.topic: conceptual apiname: - "SQLServerResultSet.isFirst" apilocation: - "sqljdbc.jar" apitype: "Assembly" ms.assetid: 2ff94b95-32ad-4378-8bb1-970030527bb2 author: David-Engel ms.author: v-daenge --- # isFirst Method (SQLServerResultSet) [!INCLUDE[Driver_JDBC_Download](../../../includes/driver_jdbc_download.md)] Retrieves whether the cursor is on the first row of this [SQLServerResultSet](../../../connect/jdbc/reference/sqlserverresultset-class.md) object. ## Syntax ``` public boolean isFirst() ``` ## Return Value **true** if the cursor is on the first row. **false** if the cursor is at any other position or if the result set contains no rows. ## Exceptions [SQLServerException](../../../connect/jdbc/reference/sqlserverexception-class.md) ## Remarks This isFirst method is specified by the isFirst method in the java.sql.ResultSet interface. If this method is used with forward and dynamic cursors, an exception is thrown. ## See Also [SQLServerResultSet Members](../../../connect/jdbc/reference/sqlserverresultset-members.md) [SQLServerResultSet Class](../../../connect/jdbc/reference/sqlserverresultset-class.md)