--- title: "getString Method (java.lang.String) | 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: - "SQLServerCallableStatement.getString (java.lang.String)" apilocation: - "sqljdbc.jar" apitype: "Assembly" ms.assetid: f67371e0-e879-4188-85fc-ecb85f0be2a9 author: David-Engel ms.author: v-daenge --- # getString Method (java.lang.String) [!INCLUDE[Driver_JDBC_Download](../../../includes/driver_jdbc_download.md)] Retrieves the value of the designated parameter as a **String** in the Java programming language given the parameter name. ## Syntax ``` public java.lang.String getString(java.lang.String sCol) ``` #### Parameters *sCol* A **String** that contains the parameter name. ## Return Value A **String** value. ## Exceptions [SQLServerException](../../../connect/jdbc/reference/sqlserverexception-class.md) ## Remarks This getString method is specified by the getString method in the java.sql.CallableStatement interface. All columns in [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] can be returned as a string. This means that a string representation of all number-based and character-based types, and a hex-string representation of binary columns such as binary, varbinary, varbinary(max), image, timestamp, and uniqueidentifier, can be returned. Location-sensitive types such as money, smallmoney, datetime, smalldatetime, float, real, decimal, and numeric will return the canonical toString() format for the underlying value of the type. User-defined types are returned as hexadecimal string values. ## See Also [getString Method (SQLServerCallableStatement)](../../../connect/jdbc/reference/getstring-method-sqlservercallablestatement.md) [SQLServerCallableStatement Members](../../../connect/jdbc/reference/sqlservercallablestatement-members.md) [SQLServerCallableStatement Class](../../../connect/jdbc/reference/sqlservercallablestatement-class.md)