--- title: "setString Method (long, java.lang.String) - NClob | Microsoft Docs" ms.custom: "" ms.date: "01/19/2017" ms.prod: sql ms.prod_service: connectivity ms.reviewer: "" ms.technology: connectivity ms.topic: conceptual ms.assetid: 698073b2-3f0c-449c-ad68-48144698fe8f author: David-Engel ms.author: v-daenge --- # setString Method (long, java.lang.String) (SQLServerNClob) [!INCLUDE[Driver_JDBC_Download](../../../includes/driver_jdbc_download.md)] Writes the specified **String** to the **NCLOB** starting at the specified position. ## Syntax ``` public int setString(long pos, java.lang.String str) ``` #### Parameters *pos* The position at which to start writing to the **NCLOB**; the first position is 1. *str* The String to be written to the **NCLOB**. ## Return Value The number of characters written. ## Exceptions [SQLServerException](../../../connect/jdbc/reference/sqlserverexception-class.md) ## Remarks This setString method is specified by the setString method in the java.sql.NClob interface. ## See Also [SQLServerNClob Methods](../../../connect/jdbc/reference/sqlservernclob-methods.md) [SQLServerNClob Members](../../../connect/jdbc/reference/sqlservernclob-members.md) [SQLServerNClob Class](../../../connect/jdbc/reference/sqlservernclob-class.md)