Exemple #1
0
        /// <summary>
        /// Writes <c>len</c> characters of <c>str</c>, starting at character
        /// <c>offset</c>, to the <c>CLOB</c> value that this <c>IClob</c>
        /// represents.
        /// </summary>
        /// <param name="pos">
        /// The position at which to start writing to this <c>CLOB</c> object.
        /// </param>
        /// <param name="str">
        /// The string to be written to the <c>CLOB</c> value that this
        /// <c>IClob</c> object represents.
        /// </param>
        /// <param name="offset">
        /// The offset into <c>str</c> to start reading the characters
        /// to be written.
        /// </param>
        /// <param name="length">
        /// The number of characters to be written.
        /// </param>
        /// <returns>
        /// The number of characters written.
        /// </returns>
        /// <exception cref="HsqlDataSourceException">
        /// If there is an error accessing the <c>CLOB</c> value.
        /// </exception>
        int IClob.SetString(long pos, string str, int offset, int length)
        {
            lock (this)
            {
                CheckFree();

                try
                {
                    return(m_clob.setString(pos, str, offset, length));
                }
                catch (java.sql.SQLException se)
                {
                    throw new HsqlDataSourceException(se);
                }
                catch (java.lang.Exception e)
                {
                    throw new HsqlDataSourceException(e.toString(), e);
                }
            }
        }