IConfigureDatabase.AttachDatabase Method

Syntax

The syntax of the AttachDatabase method is:

AttachDatabase(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 attach the database to 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 AttachDatabase Method

using Unisys.AgileBusiness.RuntimeAPI;
            IConfigureDatabase databaseConfig = RuntimeFactory.GetConfigDB();
            DatabaseParameters parameter = new DatabaseParameters()
            {
                DatabaseName = "MyTestDB",
                DatabaseServerRegistration = "Default"
            };
            StatusInfo status = databaseConfig.AttachDatabase(parameter);