zoukankan      html  css  js  c++  java
  • 获取sde 工作空间 propertys

    // This example shows how to inspect and display different types of properties for a workspace.
    public void DisplayWorkspaceProperties(IWorkspace workspace)
    
    {
    
      // Cast the workspace to the IWorkspaceProperties interface.
    
      IWorkspaceProperties workspaceProperties = (IWorkspaceProperties)workspace;
    
    
      // Example #1: Check whether or not the workspace can execute SQL. The first step is to retrieve
    
      // the property.
    
      IWorkspaceProperty canExecuteSqlProperty = workspaceProperties.get_Property(esriWorkspacePropertyGroupType.esriWorkspacePropertyGroup,
    
        (int)esriWorkspacePropertyType.esriWorkspacePropCanExecuteSQL);
    
    
      // Now check whether the property is supported.
    
      if (canExecuteSqlProperty.IsSupported)
    
      {
    
        // If the property is supported, check its value. This property returns a boolean value.
    
        Boolean canExecuteSql = Convert.ToBoolean(canExecuteSqlProperty.PropertyValue);
    
        Console.WriteLine("Workspace can execute SQL: {0}", canExecuteSql);
    
      }
    
      else
    
      {
        // If the property is not supported, it's impossible to check its value.
    
        Console.WriteLine("esriWorkspacePropCanExecuteSQL is not supported by the workspace.");
    
      }
    
    
      // Example #2: Find the maximum field name length for the workspace.
    
      IWorkspaceProperty maxFieldNameLengthProperty = workspaceProperties.get_Property(esriWorkspacePropertyGroupType.esriWorkspaceTablePropertyGroup,
    
        (int)esriWorkspaceTablePropertyType.esriTablePropMaxFieldNameLength);
    
    
      // Now check whether the property is supported.
    
      if (maxFieldNameLengthProperty.IsSupported)
    
      {
    
        // If the property is supported, check its value. This property returns an integer value.
    
        int maxFieldNameLength = Convert.ToInt32(maxFieldNameLengthProperty.PropertyValue);
    
        Console.WriteLine("Maximum field name length: {0}", maxFieldNameLength);
    
      }
    
      else
    
      {
        // If the property is not supported, it's impossible to check its value.
    
        Console.WriteLine("esriTablePropMaxFieldNameLength is not supported by the workspace.");
    
      }
    
    }
  • 相关阅读:
    CodeForces 173B Chamber of Secrets spfa
    CodeForces 173A Rock-Paper-Scissors 数学
    Codeforces Gym 100803G Flipping Parentheses 线段树+二分
    Codeforces Gym 100803D Space Golf 物理题
    Codeforces Gym 100803F There is No Alternative 暴力Kruskal
    Codeforces Gym 100803C Shopping 贪心
    《白日梦想家》观后感
    select sum也会返回null值
    mysql update更新带子查询的实现方式
    mysql 添加索引 mysql 如何创建索引
  • 原文地址:https://www.cnblogs.com/liwenqiang/p/4109528.html
Copyright © 2011-2022 走看看