Class IfDatabaseExistsTask
Checks if a database exists.
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
Type | Name | Description |
---|---|---|
System.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) |
System.String | databaseName | The database name that you want to check for existence |
Returns
Type | Description |
---|---|
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
Type | Name | Description |
---|---|---|
System.String | databaseName | The database name that you want to check for existence |
Returns
Type | Description |
---|---|
System.Boolean | True if the database exists |