EnvEraseDatabase() private méthode

private EnvEraseDatabase ( IntPtr handle, short name, int flags ) : int
handle System.IntPtr
name short
flags int
Résultat int
Exemple #1
0
        /// <summary>
        /// Deletes a Database from this Environment
        /// </summary>
        /// <remarks>
        /// This method wraps the native ups_env_erase_db function.
        /// </remarks>
        /// <param name="name">The name of the Database which is deleted.
        /// If a Database with this name does not exist, the function will throw
        /// <see cref="UpsConst.UPS_DATABASE_NOT_FOUND"/>.</param>
        /// <exception cref="DatabaseException">
        ///   <list type="bullet">
        ///   <item><see cref="UpsConst.UPS_DATABASE_NOT_FOUND"/>
        ///     if a Database with this name does not exist</item>
        ///   <item><see cref="UpsConst.UPS_DATABASE_ALREADY_OPEN"/>
        ///     if the Database with the new name is still open</item>
        ///   </list>
        /// </exception>
        public void EraseDatabase(short name)
        {
            int st;

            lock (this) {
                st = NativeMethods.EnvEraseDatabase(handle, name, 0);
            }
            if (st != 0)
            {
                throw new DatabaseException(st);
            }
        }