DATA SEGMENT LIST

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 6.0


DATA SEGMENT LIST (Segments)

ParameterTypeDescription
SegmentsString arrayLong names of data segments for the database

Description

DATA SEGMENT LIST populates the segments array with the long names of the data segments for the database with which you are currently working.

WARNING: This command does nothing if executed on 4D Client. If you need (for administrative purposes) to display a list of the data segments on a 4D Client station, use a Stored Procedure to build the data segment list and store it in a variable on the server machine, then get the contents of this variable using the GET PROCESS VARIABLE command.

Examples

1. In the Data Segments Information form for the [Dialogs] table, you want to display a drop-down list populated with the names of the data segments. To do so, write:

      ` [Dialogs];"Data Segments Information" form method
   Case of 
      : (Form event=On Load )
            ` ...    
         ARRAY STRING(255;asDataSegName;0)
         DATA SEGMENT LIST(asDataSegName)
            ` ...
   End case 

2. The following method tells you if a database is segmented.

      ` Is data file segmented -> Boolean
   C_BOOLEAN ($0)
   DATA SEGMENT LIST($asDataSegName)
   $0:=(Size of array($asDataSegName)>1)
   

3. After a call to ADD DATA SEGMENT, you want to test whether the user added new segments.

   DATA SEGMENT LIST($asBefore)
   ADD DATA SEGMENT
   DATA SEGMENT LIST($asAfter)
   If(Size of array($asBefore)#Size of array($asAfter))
      ` Yes, there are more data segments
   Else
      ` Same number of data segments
   End if

See Also

Application file, Data file, Structure file.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next