Skip to content

Latest commit

 

History

History
57 lines (39 loc) · 2.28 KB

File metadata and controls

57 lines (39 loc) · 2.28 KB
title setNCharacterStream Method to Reader object - long | 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 af9a1ba8-7980-43fa-88e5-14f6cc5e897c
author David-Engel
ms.author v-daenge

setNCharacterStream Method (java.lang.String, java.io.Reader, long)

[!INCLUDEDriver_JDBC_Download]

Sets the designated parameter to the specified Reader object, which is the specified number of characters long.

Syntax

  
public final void setNCharacterStream(java.lang.String parameterName,  
                     java.io.Reader value,  
                     long length)  

Parameters

parameterName

A String that indicates the parameter name.

value

A Reader object.

length

A long that indicates the number of characters in the stream.

Exceptions

SQLServerException

Remarks

This setNCharacterStream method is specified by the setNCharacterStream method in the java.sql.CallableStatement interface.

This method should be used for NCHAR, NVARCHAR, NTEXT, and XML data types.

If the length of the stream is different than what is specified in the length parameter, the JDBC driver throws an exception when the row is updated or inserted.

If the length of the stream is unknown, the length parameter may be set to -1 to indicate that the driver should accept the stream regardless of its length. With sqljdbc4.jar, we recommend that you use the JDBC 4.0 method setNCharacterStream Method (java.lang.String, java.io.Reader) when the application wants to update the column from a stream whose length is unknown.

See Also

setNCharacterStream Method (SQLServerCallableStatement)
SQLServerCallableStatement Members