Logo Search packages:      
Sourcecode: mysql-connector-java version File versions  Download package

void com::mysql::jdbc::ServerPreparedStatement::setBinaryStream ( int  parameterIndex,
InputStream  x,
int  length 
) throws SQLException [inline]

See also:
java.sql.PreparedStatement::setBinaryStream(int, java.io.InputStream, int)

Reimplemented from com::mysql::jdbc::PreparedStatement.

Definition at line 1685 of file ServerPreparedStatement.java.

References checkClosed(), com::mysql::jdbc::StatementImpl::connection, getBinding(), com::mysql::jdbc::ConnectionPropertiesImpl::getUseStreamLengthsInPrepStmts(), and setNull().

                                      {
            checkClosed();

            if (x == null) {
                  setNull(parameterIndex, java.sql.Types.BINARY);
            } else {
                  BindValue binding = getBinding(parameterIndex, true);
                  setType(binding, MysqlDefs.FIELD_TYPE_BLOB);

                  binding.value = x;
                  binding.isNull = false;
                  binding.isLongData = true;

                  if (this.connection.getUseStreamLengthsInPrepStmts()) {
                        binding.bindLength = length;
                  } else {
                        binding.bindLength = -1;
                  }
            }
      }


Generated by  Doxygen 1.6.0   Back to index