ParamIndex(ParamName: String): Integer;
ParamIndex[ParamName: System.String]: System.Int32;
ParamName. Parameter name of security module.
The ParamIndex property returns an index of security module parameter.
Parameters' names differ for different DBMS. While writing names use upper case.
Parameter name | Brief description |
Oracle | MSSQL | DB |
SERVER | Server name. | |||
SCHEME | Identifier of the database (repository). | |||
OSAUTHENTPREFIX | Prefix before user names. | |||
DATABASE_ONLY | Identifier of the database. | |||
SCHEMA_ONLY | Identifier of custom scheme in database. | |||
DATABASE | Identifier of the database. | |||
FILEGROUP | Custom file group of the database. | |||
PROVIDER | Driver identifier. |
Conventions:
- parameter name is available.
- parameter name is unavailable.
To execute an example create a form, put components on it: a button with the Button1 identifier and a multiline text editor with the Memo1 identifier. Add links to the Metabase, Dal, Db system assemblies. It is supposed that the repository contains a database with the DATA identifier.
The example is a handler of the OnClick event for a button.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
MB: IMetabase;
DB: IDatabaseInstance;
SC: ISecurityConnection;
S: ISecurityPackageLogonDataEx;
Index: integer;
Begin
MB := MetabaseClass.Active;
DB := MB.ItemById("DATA").Open(Null) As IDatabaseInstance;
SC := DB.Connection;
S := SC.LogonData As ISecurityPackageLogonDataEx;
Index := S.ParamIndex("SCHEME");
memo1.Lines.Add(S.ParamDescription(Index) + " " + S.IsLocal(Index).ToString);
End Sub Button1OnClick;
On clicking the button a description of security module parameter and a possibility to use it as a shared variable are displayed into text editor.
To execute an example create a form, put components on it: a button with the Button1 identifier and a multiline list with the ListBox1 identifier. Add links to the Dal, Db system assemblies. It is supposed that the repository contains a database with the DATA identifier.
The example is a handler of the Click event for a button.
Private Sub button1_Click( sender : System.Object; e : System.EventArgs );
Var
MB: IMetabase;
DB: IDatabaseInstance;
SC: ISecurityConnection;
S: ISecurityPackageLogonDataEx;
Index: integer;
Begin
MB := Self.Metabase;
DB := MB.ItemById["DATA"].Open(Null) As IDatabaseInstance;
SC := DB.Connection;
S := SC.LogonData As ISecurityPackageLogonDataEx;
Index := S.ParamIndex["SCHEME"];
ListBox1.Items.Add(S.ParamDescription[Index] + " " + S.IsLocal[Index].ToString());
End Sub;
On clicking the button a description of security module parameter and a possibility to use it as a shared variable are displayed into a list.
See also: