GetListDefNames

Descrizione

Restituisce un elenco degli elenchi dinamici nel database corrente.

Sintassi

VBScript

sessionObj.GetListDefNames 

Perl

$sessionObj->GetListDefNames(); 
Identificativo
Descrizione
session
L'oggetto Session che rappresenta la sessione di accesso al database corrente.
Valore di ritorno

Per Visual Basic, viene restituito un valore Variant che contiene un array i cui
elementi sono stringhe. Ciascuna stringa contiene il nome di un campo.
Per Perl, viene restituito un riferimento a un array di stringhe

Esempio

VBScript

' This example assumes there is at least 1 dynamic list

' in the current database-access session.

set sessionObj = GetSession 

sessionObj.UserLogon "admin", "", "SAMPL", AD_PRIVATE_SESSION, ""



' Get a list of the names of Dynamic Lists that exist in this database...

DynamicListNamesRef = sessionObj.GetListDefNames

' For each of the lists, print out its members...

For Each ListName in DynamicListNamesRef

   print ListName   

   ' Then, for each list, get the list members in each list,

   members = sessionObj.GetListMembers(ListName)

   ' print out the list members...

   For Each member In members

      print member

   Next

Next 

Perl

# This example assumes there is at least 1 dynamic list

# in the current database-access session.

$sessionObj = $entity->GetSession();

$sessionObj->UserLogon("admin","","SAMPL","");



# Get a list of the names of Dynamic Lists that exist in this database...

$ListDefNamesREF = $sessionObj->GetListDefNames();

$NListDefNames = scalar @$ListDefNamesREF;

if ( $NListDefNames == 0) {

    print "\n"

        ."There are no dynamic lists in this database.\n"

        ."Unable to continue.\n"

        ."Re-invoke this program specifying a user database with some dynamic 
lists defined.\n";

    exit 1;

} else {

    print "\nThere are $NListDefNames dynamic lists in this database:\n";

    foreach $ListName (@$ListDefNamesREF) {

        print "  '$ListName'\n";

    }

}

# For one of the lists, print out its members...

$ListName = @$ListDefNamesREF[0];

$members = $sessionObj->GetListMembers($ListName);

foreach $member (@$members){

   print $member, "\n";
   } 

Feedback