IPrxMapDataAdapter.AdapterType

Syntax

AdapterType: PrxMapAdapter;

Description

The AdapterType property returns type of data adapter for the map.

Example

Executing the example requires a table with data by some regions and a map with the Regions layer in a regular report with the REGULAR_REPORT identifier.

Add links to the Dimensions, Metabase, Report, Tab system assemblies.

Sub UserProc;
Var
    Mb: IMetabase;
    MObj: IMetabaseObject;
    Report: IPrxReport;
    Tab: ITabSheet;
    Map: IMap;
    BarVisual: IMapBarVisual;
    PrxDA: IPrxMapDataAdapter;
    Slice: IPrxSlice;
    MapDAdapt: IPrxMapDataAdapter;
    i, j: Integer;
Begin
    Mb := MetabaseClass.Active;
    MObj := Mb.ItemById(
"REGULAR_REPORT").Edit;
    Report := MObj 
As IPrxReport;
    Tab := (Report.ActiveSheet 
As IPrxTable).TabSheet;
    Map := Tab.Objects.Item(
0).Extension As IMap;
    MapDAdapt := Map.Layers.FindByName(
"Regions").TextDataAdapter As IPrxMapDataAdapter;
    i := MapDAdapt.AdapterType 
As Integer;
    
If i = 0 Then
       Debug.WriteLine(
" - Adapter type is not determined.");
    
Else If i = 1 Then
            Debug.WriteLine(
" - Static adapter type.");
         
Else If i = 2 Then
                 Debug.WriteLine(
" - Dynamic adapter type.");
              
Else If i = 3 Then
                      Debug.WriteLine(
" - Layer area adapter.");
                   
Else If i = 4 Then
                           Debug.WriteLine(
" - Territory info adapter.");
                        
End If;
                   
End If;
              
End If;
         
End If;
    
End If;
    j := MapDAdapt.AdapterDataType 
As Integer;
    
If j = 0 Then
       Debug.WriteLine(
" - Data source is not determined.");
    
Else If j = 1 Then
            Debug.WriteLine(
" - Data is taken from slice.");
         
Else If j = 2 Then
                 Debug.WriteLine(
" - Data is taken from specified value range.");
              
End If;
         
End If;
    
End If;
End Sub UserProc;

The console window displays adapter type and map source data source.

See also:

IPrxMapDataAdapter