Skip to content

Latest commit

 

History

History
64 lines (49 loc) · 2.3 KB

File metadata and controls

64 lines (49 loc) · 2.3 KB
title getString Method (java.lang.String) (SQLServerResultSet) | Microsoft Docs
ms.custom
ms.date 01/19/2017
ms.prod sql
ms.prod_service drivers
ms.service
ms.component jdbc
ms.reviewer
ms.suite sql
ms.technology
drivers
ms.tgt_pltfrm
ms.topic article
apiname
SQLServerResultSet.getString (java.lang.String)
apilocation
sqljdbc.jar
apitype Assembly
ms.assetid 8a98c8a8-61d0-40c9-9335-25a87b732dc3
caps.latest.revision 10
author MightyPen
ms.author genemi
manager jhubbard
ms.workload On Demand

getString Method (java.lang.String) (SQLServerResultSet)

[!INCLUDEDriver_JDBC_Download]

Retrieves the value of the designated column name in the current row of this SQLServerResultSet object as a String in the Java programming language.

Syntax

  
public java.lang.String getString(java.lang.String columnName)  

Parameters

columnName

A String that contains the column name.

Return Value

A String value.

Exceptions

SQLServerException

Remarks

This getString method is specified by the getString method in the java.sql.ResultSet interface.

All columns in SQL Server 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 (SQLServerResultSet)
SQLServerResultSet Members
SQLServerResultSet Class