Skip to content

Latest commit

 

History

History
55 lines (38 loc) · 2.2 KB

File metadata and controls

55 lines (38 loc) · 2.2 KB
title setCharacterStream Method (int, java.io.Reader, 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 cb6ac7f5-81ae-4cb7-87c8-cbee40d278c5
author David-Engel
ms.author v-daenge

setCharacterStream Method (int, java.io.Reader, long)

[!INCLUDEDriver_JDBC_Download]

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

Syntax

  
public final void setCharacterStream(int parameterIndex,  
                                    java.io.Reader reader,  
                                    long length)  

Parameters

parameterIndex

An int that indicates the parameter number.

reader

The java.io.Reader object that contains the Unicode data.

length

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

Exceptions

SQLServerException

Remarks

This setCharacterStream method is specified by the setCharacterStream method in the java.sql.PreparedStatement interface.

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 setCharacterStream Method (int, java.io.Reader) when the application wants to update the column from a stream whose length is unknown.

See Also

setCharacterStream Method (SQLServerPreparedStatement)
SQLServerPreparedStatement Members