Class IfDatabaseExistsTask
Checks if a database exists.
Implements
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: ETLBox.ControlFlow
Assembly: ETLBox.dll
Syntax
public sealed class IfDatabaseExistsTask : IfExistsTask, ILoggableTask
Constructors
IfDatabaseExistsTask()
Declaration
public IfDatabaseExistsTask()
IfDatabaseExistsTask(string)
Declaration
public IfDatabaseExistsTask(string databaseName)
Parameters
Type | Name | Description |
---|---|---|
string | databaseName |
Methods
IsExisting(IConnectionManager, string)
Ćhecks if the database exists
Declaration
public static bool IsExisting(IConnectionManager connectionManager, string databaseName)
Parameters
Type | Name | Description |
---|---|---|
IConnectionManager | connectionManager | 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) |
string | databaseName | The database name that you want to check for existence |
Returns
Type | Description |
---|---|
bool | 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
Type | Name | Description |
---|---|---|
string | databaseName | The database name that you want to check for existence |
Returns
Type | Description |
---|---|
bool | True if the database exists |