Skip to content

Latest commit

 

History

History
60 lines (43 loc) · 2.17 KB

File metadata and controls

60 lines (43 loc) · 2.17 KB
title setAsciiStream Method (int, java.io.InputStream, int) | 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
SQLServerPreparedStatement.setAsciiStream
apilocation
sqljdbc.jar
apitype Assembly
ms.assetid 9436c39f-f1a1-484a-a75b-776a72ca70f4
author David-Engel
ms.author v-daenge

setAsciiStream Method (int, java.io.InputStream, int)

[!INCLUDEDriver_JDBC_Download]

Sets the designated parameter number to the given InputStream object with the given number of bytes.

Syntax

  
public final void setAsciiStream(int n,  
                                 java.io.InputStream x,  
                                 int length)  

Parameters

n

An int that indicates the parameter number.

x

An InputStream object.

length

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

See Also

setAsciiStream Method (SQLServerPreparedStatement)
SQLServerPreparedStatement Members