IMetabaseObjectCopyInfo.NoSave

Syntax

NoSave: Boolean;

Description

The NoSave property determines whether copy of an object is saved after copying.

Comments

Default property value is False, in this case a copy is saved at once. If the property value is True, a copy is not saved after copying. A copy opened for edit is available in the Destination property. It is used if after copying it is necessary to perform any additional changes in a copy to avoid double saving.

Example

Executing the example requires that the repository contains a database with the BD_1 identifier.

Sub Main;

Var

MB: IMetabase;

CInfo: IMetabaseObjectCopyInfo;

MObj: IMetabaseObject;

BD: IDatabase;

Begin

MB := MetabaseClass.Active;

CInfo := MB.CreateCopyInfo;

CInfo.Id := "BD_2";

CInfo.Name := "Database 2";

CInfo.Destination := MB.Root;

CInfo.Source := MB.ItemById("BD_1");

CInfo.NoSave := True;

MB.CopyObject(CInfo);

MObj := CInfo.Destination As IMetabaseObject;

BD := MObj As IDatabase;

BD.LogonData.ParamValue("SCHEME") := "TestShema_1";

MObj.Save;

End Sub Main;

After executing this example database is copied in a repository root. The name of a scheme to that a connection is performed is changed in the received copy of a database before saving.

See also:

IMetabaseObjectCopyInfo