setAsciiStream(int parameterIndex, InputStream x)

Syntax:

void setAsciiStream(int parameterIndex,
                    InputStream x)
                    throws SQLException

Description:

Sets the designated parameter to the given input stream. When a very large ASCII value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.InputStream. Data will be read from the stream as needed until end-of-file is reached. The JDBC driver will do any necessary conversion from ASCII to the database char format.

Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.

Parameters:

parameterIndex

the first parameter is 1, the second is 2, ...

x

the Java input stream that contains the ASCII parameter value

Throws:

SQLException - if a database access error occurs, parameterIndex is less than 1 or greater than the number of parameters, or the prepared statement has been closed

Reference:

For more information, reference JDBC documentation for: PreparedStatement.setAsciiStream(int, InputStream)