IMetabaseUpdateDataObjectNode.RequestAdminCredentials

Fore Syntax

RequestAdminCredentials: Boolean;

Fore.NET Syntax

RequestAdminCredentials: Boolean;

Description

The RequestAdminCredentials property determines whether user credentials are requested if on update installation under the current user there are no sufficient permissions.

Comments

By default this property is set to False. In this case when the user rights do not allow the data insertion for the tables the user credentials request is not displayed and the error is generated. When the value is True, the credentials of a user who has permissions to create tables and insert data in the corresponding database, are requested.

This setting is relevant only for inserting the data to the tables.

Fore Example

Executing the example requires that the repository contains a table with the Table_1 identifier. Add a link to the Metabase system assembly.

Sub UserProc;
Var
    Mb: IMetabase;
    MBDesc: IMetabaseObjectDescriptor;
    MUpdate: IMetabaseUpdate;
    ObjNode: IMetabaseUpdateDataObjectNode;
Begin
    Mb := MetabaseClass.Active;
    MBDesc := MB.ItemById("Table_1");
    MUpdate := MB.CreateUpdate;
    ObjNode := MUpdate.RootFolder.Add(MetabaseUpdateNodeType.DataObject) As IMetabaseUpdateDataObjectNode;
    ObjNode.Label := MBDesc.Id;
    ObjNode.Method := MetabaseUpdateMethod.All;
    ObjNode.Object := MBDesc;
    ObjNode.BatchMode := ObjectUpdateDataBatchMode.UpdateInsert;
    ObjNode.RequestAdminCredentials := True;
    MUpdate.SaveToFileNF("c:\Update.pefx");
End Sub UserProc;

After executing this example file of update is created. When installing this update in case of the absence of rights to perform the operation the credentials request is displayed.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Public Shared Sub Main(Params: StartParams);
Var
    Mb: IMetabase;
    MBDesc: IMetabaseObjectDescriptor;
    MUpdate: IMetabaseUpdate;
    ObjNode: IMetabaseUpdateDataObjectNode;
Begin
    Mb := Params.Metabase;
    MBDesc := MB.ItemById["Table_1"];
    MUpdate := MB.CreateUpdate();
    ObjNode := MUpdate.RootFolder.Add(MetabaseUpdateNodeType.untDataObject) As IMetabaseUpdateDataObjectNode;
    ObjNode.Label := MBDesc.Id;
    ObjNode.Method := MetabaseUpdateMethod.mumAll;
    ObjNode.Object := MBDesc;
    ObjNode.BatchMode := ObjectUpdateDataBatchMode.obupdabamoUpdateInsert;
    ObjNode.RequestAdminCredentials := True;
    MUpdate.SaveToFileNF("c:/Update.pefx");
End Sub;

After executing this example file of update is created. When installing this update in case of the absence of rights to perform the operation the credentials request is displayed.

See also:

IMetabaseUpdateDataObjectNode