Class DropDatabaseTask

Drops a database. Use DropIfExists to drop a database only if it exists. In MySql, this will drop a schema.

Inheritance
System.Object
DropDatabaseTask
Implements
Namespace: ETLBox.ControlFlow.Tasks
Assembly: ETLBox.dll
Syntax
    public sealed class DropDatabaseTask : DropTask<IfDatabaseExistsTask>, ILoggableTask
Examples
DropDatabaseTask.Delete("DemoDB");

Constructors

DropDatabaseTask()

Declaration
    public DropDatabaseTask()

DropDatabaseTask(String)

Declaration
    public DropDatabaseTask(string databaseName)
Parameters
TypeNameDescription
System.StringdatabaseName

Methods

Drop(IConnectionManager, String)

Drops a database. In MySql, this will drop a schema.

Declaration
    public static void Drop(IConnectionManager connectionManager, string databaseName)
Parameters
TypeNameDescription
IConnectionManagerconnectionManager

The connection manager of the server you want to connect. Make sure this points to a database that does exist (e.g. a system database)

System.StringdatabaseName

Name of the database (MySql: schema) to drop

Drop(String)

Drops a database. In MySql, this will drop a schema. Make sure that your default connection string points to the server itself and to an existing database (e.g. a system database).

Declaration
    public static void Drop(string databaseName)
Parameters
TypeNameDescription
System.StringdatabaseName

Name of the database (MySql: schema) to drop

DropIfExists(IConnectionManager, String)

Drops a database if the database exists. In MySql, this will drop a schema.

Declaration
    public static void DropIfExists(IConnectionManager connectionManager, string databaseName)
Parameters
TypeNameDescription
IConnectionManagerconnectionManager

The connection manager of the server you want to connect. Make sure this points to a database that does exist (e.g. a system database)

System.StringdatabaseName

Name of the database (MySql: schema) to drop

DropIfExists(String)

Drops a database if the database exists. In MySql, this will drop a schema.

Declaration
    public static void DropIfExists(string databaseName)
Parameters
TypeNameDescription
System.StringdatabaseName

Name of the database (MySql: schema) to drop

Implements