Java Code Examples for com.mysql.jdbc.PreparedStatement#setNCharacterStream()
The following examples show how to use
com.mysql.jdbc.PreparedStatement#setNCharacterStream() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JDBC4PreparedStatementHelper.java From r-course with MIT License | 4 votes |
static void setNClob(PreparedStatement pstmt, int parameterIndex, Reader reader) throws SQLException { pstmt.setNCharacterStream(parameterIndex, reader); }
Example 2
Source File: JDBC4PreparedStatementHelper.java From Komondor with GNU General Public License v3.0 | 4 votes |
static void setNClob(PreparedStatement pstmt, int parameterIndex, Reader reader) throws SQLException { pstmt.setNCharacterStream(parameterIndex, reader); }
Example 3
Source File: JDBC4PreparedStatementHelper.java From r-course with MIT License | 3 votes |
/** * JDBC 4.0 Set a NCLOB parameter. * * @param i * the first parameter is 1, the second is 2, ... * @param x * an object representing a NCLOB * * @throws SQLException * if a database error occurs */ static void setNClob(PreparedStatement pstmt, int parameterIndex, NClob value) throws SQLException { if (value == null) { pstmt.setNull(parameterIndex, java.sql.Types.NCLOB); } else { pstmt.setNCharacterStream(parameterIndex, value.getCharacterStream(), value.length()); } }
Example 4
Source File: JDBC4PreparedStatementHelper.java From r-course with MIT License | 3 votes |
/** * JDBC 4.0 Set a NCLOB parameter. * * @param parameterIndex * the first parameter is 1, the second is 2, ... * @param reader * the java reader which contains the UNICODE data * @param length * the number of characters in the stream * * @throws SQLException * if a database error occurs */ static void setNClob(PreparedStatement pstmt, int parameterIndex, Reader reader, long length) throws SQLException { if (reader == null) { pstmt.setNull(parameterIndex, java.sql.Types.NCLOB); } else { pstmt.setNCharacterStream(parameterIndex, reader, length); } }
Example 5
Source File: JDBC4PreparedStatementHelper.java From Komondor with GNU General Public License v3.0 | 3 votes |
/** * JDBC 4.0 Set a NCLOB parameter. * * @param i * the first parameter is 1, the second is 2, ... * @param x * an object representing a NCLOB * * @throws SQLException * if a database error occurs */ static void setNClob(PreparedStatement pstmt, int parameterIndex, NClob value) throws SQLException { if (value == null) { pstmt.setNull(parameterIndex, java.sql.Types.NCLOB); } else { pstmt.setNCharacterStream(parameterIndex, value.getCharacterStream(), value.length()); } }
Example 6
Source File: JDBC4PreparedStatementHelper.java From Komondor with GNU General Public License v3.0 | 3 votes |
/** * JDBC 4.0 Set a NCLOB parameter. * * @param parameterIndex * the first parameter is 1, the second is 2, ... * @param reader * the java reader which contains the UNICODE data * @param length * the number of characters in the stream * * @throws SQLException * if a database error occurs */ static void setNClob(PreparedStatement pstmt, int parameterIndex, Reader reader, long length) throws SQLException { if (reader == null) { pstmt.setNull(parameterIndex, java.sql.Types.NCLOB); } else { pstmt.setNCharacterStream(parameterIndex, reader, length); } }