コード例 #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void close() throws SQLException
        public virtual void close()
        {
            if (closed_)
            {
                return;
            }
            try
            {
                generatedKey_ = null;
                if (currentResultSet_ != null)
                {
                    currentResultSet_.close();
                    currentResultSet_ = null;
                }
                attribs_.clear();
                conn_.DatabaseConnection.deleteRequestParameterBlock(attribs_, rpbID_);
                conn_.freeRPBID(rpbID_);

                if (!string.ReferenceEquals(statementName_, null))
                {
                    conn_.freeStatementAndCursorNames(statementName_, cursorName_);
                }
                statementName_ = null;
                cursorName_    = null;
            }
            catch (IOException io)
            {
                throw JDBCConnection.convertException(io, lastSQLCode_, lastSQLState_);
            }
            finally
            {
                closed_ = true;
            }
        }