16.20 - setBinaryStream() - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL External Routine Programming

Advanced SQL Engine
Teradata Database
Release Number
Release Date
April 2020
Content Type
Programming Reference
Publication ID
English (United States)


Retrieves a stream that can be used to write the XML value that this SQLXML instance represents.


OutputStream setBinaryStream()
                throws SQLException

Return Value

A stream to which data can be written.

The stream begins at position 0. The bytes of the stream are interpreted according to Appendix F of the XML 1.0 specification.

Usage Notes

The behavior of this method is the same as ResultSet.updateBinaryStream() when the designated column of the ResultSet has a type java.sql.Types of SQLXML.

The SQL XML object becomes not writeable when this method is called and may also become unreadable depending on the implementation.


Throws SQLException if there is an error processing the XML value. An exception is thrown if the state is not writable.

A database specific code “9752 (ERRUDFJAVAXML) <Error processing XML value in setBinaryStream>” is returned.