OmniGroupServer 12.13

# ExecuteSectionN

In some cases, you must create multiple `[Execute]` sections to execute several SQL statements. If this is set, it executes the `SQLStatement` in each of the sections for each row returned by the current query.

NOTE: This parameter is not normally required. You can usually create a view that contains all the required data and which requires only a single statement that is configured in the `[ODBC]` section.

Type: | String
Default: |
Required: | No
Configuration Section: | Database Repository or Execute
Example: |
    [ODBC]
    GroupServerLibrary=ogs_odbc.dll
    ConnectionString=DSN=Groups
    ExecuteSection0=ODBC_GetUsers

    [ODBC_GetUsers]
    SQLStatement=SELECT DISTINCT Username FROM Groups
    AddType=USER
    UserColumn=Username
    ExecuteSection0=ODBC_GetGroups

    [ODBC_GetGroups]
    SQLStatement=SELECT Groupname FROM Groups WHERE Username='@(Username)'
    AddType=USERGROUP
    UserColumn=@(Username)
    GroupColumn=Groupname
In this example, no SQL statement is found in the `[ODBC]` section. The SQL statement in the `[ODBC_GetUsers]` section is executed and usernames are retrieved. For each username returned by the `[ODBC_GetUsers]` query, the SQL statement in the `[ODBC_GetGroups]` section is executed with the appropriate value of @(Username) and the group names are extracted. In this case, multiple execute sections are not necessary and the configuration can be simplified:
    [ODBC]
    GroupServerLibrary=ogs_odbc.dll
    ConnectionString=DSN=Groups
    SQLStatement=SELECT Username, Groupname FROM Groups
    AddType=USERGROUP
    UserColumn=Username
    GroupColumn=Groupname
NOTE: `AddType=USER` is not required, because it is implied by the `AddType=USERGROUP`.
See Also: | SQLStatement

© Copyright 2022 Micro Focus or one of its affiliates
Version 12.13 | Last updated October 2022

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to swpdl.idoldocsfeedback@microfocus.com.

We appreciate your feedback!

Product: IDOL OmniGroupServer 12.13

Topic Title: ExecuteSectionN