Skip to content

Latest commit

 

History

History
55 lines (38 loc) · 2.14 KB

File metadata and controls

55 lines (38 loc) · 2.14 KB
title setAsciiStream Method to input stream bytes - 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 6bc486cd-e432-4057-8789-9957ba23dd30
author David-Engel
ms.author v-daenge

setAsciiStream Method (java.lang.String, java.io.InputStream, long)

[!INCLUDEDriver_JDBC_Download]

Sets the designated parameter to the specifiedinput stream, which will have the specified number of bytes.

Syntax

  
public final void setAsciiStream(java.lang.String parameterName,  
                                java.io.InputStream x,  
                                long length)  

Parameters

parameterName

A String that contains the parameter name.

x

An InputStream object.

length

A long that indicates the number of bytes.

Exceptions

SQLServerException

Remarks

This setAsciiStream method is specified by the setAsciiStream 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 setAsciiStream Method (java.lang.String, java.io.InputStream) when the application wants to update the column from a stream whose length is unknown.

See Also

setAsciiStream (SQLServerCallableStatement)
SQLServerCallableStatement Members