GetListDefNames

설명

현재 데이터베이스에 있는 동적 목록을 리턴합니다.

구문

VBScript

sessionObj.GetListDefNames 

Perl

$sessionObj->GetListDefNames(); 
ID
설명
session
현재 database-access 세션을 나타내는 Session 오브젝트입니다.
Return value

Visual Basic의 경우 요소가 문자열인 배열이 포함된
Variant가 리턴됩니다.
각 문자열에는 한 필드의 이름이 포함됩니다.
Perl의 경우 문자열 배열에 대한 참조가 리턴됩니다.

예제

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";
   } 

피드백