Class IfDatabaseExistsTask

Checks if a database exists.

Inheritance
System.Object
IfDatabaseExistsTask
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ETLBox.ControlFlow.Tasks
Assembly: ETLBox.dll
Syntax
    public sealed class IfDatabaseExistsTask : IfExistsTask, ILoggableTask

Constructors

IfDatabaseExistsTask()

Declaration
    public IfDatabaseExistsTask()

IfDatabaseExistsTask(String)

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

Methods

IsExisting(IConnectionManager, String)

Ćhecks if the database exists

Declaration
    public static bool IsExisting(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

The database name that you want to check for existence

Returns
TypeDescription
System.Boolean

True if the procedure exists

IsExisting(String)

Ćhecks if the database exists. 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 bool IsExisting(string databaseName)
Parameters
TypeNameDescription
System.StringdatabaseName

The database name that you want to check for existence

Returns
TypeDescription
System.Boolean

True if the database exists

Implements