Syntax
The syntax of the DetachDatabase method is:
DetachDatabase(DatabaseParameters databaseParameters)
Argument
databaseParameters: DatabaseParameters object
The object describes all the values available from the DatabaseParameter class.
The DatabaseParameter class exposes the following members to detach the database from the runtime.
Members of DatabaseParameter class
Name | Type | Description |
---|---|---|
DatabaseName | String | Name of the application database |
DatabaseServerRegistration | String | Alias of the SQL Server instance |
Return Value
If this method succeeds, it returns the StatusInfo object with the status code; Error, Warning, or Success and status message, if any.
Using the IConfigureDatabase Interface for DetachDatabase Method
using Unisys.AgileBusiness.RuntimeAPI; IConfigureDatabase databaseConfig = RuntimeFactory.GetConfigDB(); DatabaseParameters parameter = new DatabaseParameters() { DatabaseName = "MyTestDB", DatabaseServerRegistration = "Default" }; StatusInfo status = databaseConfig.DetachDatabase(parameter);