1. // This example shows how to inspect and display different types of properties for a workspace.
  2. public void DisplayWorkspaceProperties(IWorkspace workspace)
  3.  
  4. {
  5.  
  6. // Cast the workspace to the IWorkspaceProperties interface.
  7.  
  8. IWorkspaceProperties workspaceProperties = (IWorkspaceProperties)workspace;
  9.  
  10. // Example #1: Check whether or not the workspace can execute SQL. The first step is to retrieve
  11.  
  12. // the property.
  13.  
  14. IWorkspaceProperty canExecuteSqlProperty = workspaceProperties.get_Property(esriWorkspacePropertyGroupType.esriWorkspacePropertyGroup,
  15.  
  16. (int)esriWorkspacePropertyType.esriWorkspacePropCanExecuteSQL);
  17.  
  18. // Now check whether the property is supported.
  19.  
  20. if (canExecuteSqlProperty.IsSupported)
  21.  
  22. {
  23.  
  24. // If the property is supported, check its value. This property returns a boolean value.
  25.  
  26. Boolean canExecuteSql = Convert.ToBoolean(canExecuteSqlProperty.PropertyValue);
  27.  
  28. Console.WriteLine("Workspace can execute SQL: {0}", canExecuteSql);
  29.  
  30. }
  31.  
  32. else
  33.  
  34. {
  35. // If the property is not supported, it's impossible to check its value.
  36.  
  37. Console.WriteLine("esriWorkspacePropCanExecuteSQL is not supported by the workspace.");
  38.  
  39. }
  40.  
  41. // Example #2: Find the maximum field name length for the workspace.
  42.  
  43. IWorkspaceProperty maxFieldNameLengthProperty = workspaceProperties.get_Property(esriWorkspacePropertyGroupType.esriWorkspaceTablePropertyGroup,
  44.  
  45. (int)esriWorkspaceTablePropertyType.esriTablePropMaxFieldNameLength);
  46.  
  47. // Now check whether the property is supported.
  48.  
  49. if (maxFieldNameLengthProperty.IsSupported)
  50.  
  51. {
  52.  
  53. // If the property is supported, check its value. This property returns an integer value.
  54.  
  55. int maxFieldNameLength = Convert.ToInt32(maxFieldNameLengthProperty.PropertyValue);
  56.  
  57. Console.WriteLine("Maximum field name length: {0}", maxFieldNameLength);
  58.  
  59. }
  60.  
  61. else
  62.  
  63. {
  64. // If the property is not supported, it's impossible to check its value.
  65.  
  66. Console.WriteLine("esriTablePropMaxFieldNameLength is not supported by the workspace.");
  67.  
  68. }
  69.  
  70. }

获取sde 工作空间 propertys的更多相关文章

  1. 打开shpfile,mdb,sde工作空间

    打开shapefile工作空间: ESRI.ArcGIS.Geodatabase.IWorkspaceFactory wsf = new ESRI.ArcGIS.DataSourcesFile.Sha ...

  2. AO如何获取SDE数据库中的数据

    /// <summary> /// 获取Table类型表的记录 /// </summary> /// <param name="relationCheckCla ...

  3. SDE操作的许可问题

    ArcGIS二次开发和ArcGIS桌面应用中,许可是一个老生常谈的问题.以前也小结过一些经验.参考: http://www.cnblogs.com/liweis/p/4185311.html 问题描述 ...

  4. ArcGIS Engine连接ArcSDE SQL Server(获得所有SDE图层)

    ArcSDE是ESRI公司推出的基于SDE技术的空间数据库解决方案,它是在现有的关系或对象关系型数据库管理系统的基础上进行应用扩展,可以将空间数据和非空间数据存储在目前绝大多数商用DBMS中,享受商用 ...

  5. ArcGIS Engine 添加SDE数据库

    public void AddSDELayer(bool ChkSdeLinkModle){  //定义一个属性   IPropertySet propset = new PropertySetCla ...

  6. 生成sde

    /// <summary> ///获取保存的SDE文件 /// </summary> /// <param name="sdePath">< ...

  7. web项目获取资源文件

    首页 博客 学院 CSDN学院 下载 论坛 APP CSDN 问答 商城 活动 VIP会员 专题 招聘 ITeye GitChat GitChat 图文课 写博客 消息 1 评论 关注 点赞 回答 系 ...

  8. C#+ArcEngine中com对象的释放问题

    1.问题描述 最近在写C#下AE的开发,在循环获取数据并修改时碰到了两个问题"超出系统资源"和"超出打开游标最大数":在网上看了一些资料,发现都是说在循环中没有 ...

  9. IWorkSpace接口介绍 1.打开各种数据库

    IWorkspace接口提供访问工作空间的通用属性和方法,如它的连接属性,以及包含的数据集的方法. IWorkspace的成员字段: Members   Description ConnectionP ...

随机推荐

  1. jekyll : 使用github托管你的博客

    使用github托管你的博客 效果: http://wuya1234.github.io/blog/2013/11/09/start-github-blog/ 样式神马的还没整 电脑系统 我使用的是m ...

  2. PHP图形图像处理之初识GD库

    d=====( ̄▽ ̄*)b 引语 php不仅仅局限于html的输出,还可以创建和操作各种各样的图像文件,如GIF.PNG.JPEG.WBMP.XBM等. php还可以将图像流直接显示在浏览器中. 要处 ...

  3. HDU 3555 Bomb 数位dp

    题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=3555 Bomb Time Limit: 2000/1000 MS (Java/Others) Mem ...

  4. 线段树--Color the ball(多次染色问题)

    K - Color the ball Time Limit:3000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u ...

  5. 【bzoj1014】[JSOI2008]火星人prefix

    1014: [JSOI2008]火星人prefix Time Limit: 10 Sec  Memory Limit: 162 MBSubmit: 6031  Solved: 1917[Submit] ...

  6. Load hlsl

    这个函数和sample差不多 不过没有samplestate和filter http://msdn.microsoft.com/zh-cn/library/windows/desktop/bb5096 ...

  7. [百度空间] [原]跨平台编程注意事项(三): window 到 android 的 移植

    大的问题 先记录一下跨平台时需要注意的大方向. 1.OS和CPU 同一个操作系统, CPU也可能是不一样的, 比如windows也有基于arm CPU的版本,而android目前有x86,arm,mi ...

  8. samsung-smart app 开发

    http://www.samsungdforum.com/ http://seller.samsungapps.com/login/signIn.as?returnURL=%2fmain%2fsell ...

  9. vim使用指北 ---- Advanced Editing

    本节介绍vi和ex的一些高级功能. 配置vi 配置文件.exrc可以保存在你的主目录下,在vi启动的时候执行这个配置文件.但在当前工作目录下可以放置一个配置文件,对当前目录做一个自定义配置. :set ...

  10. 【基本算法】 KMP文本串模式串的字符串匹配算法

    看了两个晚上的KMP,加上基本的“暴力匹配” 今晚看懂next[j]递归求解时,突然觉得算法真的好美妙,虽然觉悟的晚但晚胜过没有是吧! 我的博客都是应试性的学习笔记,不具备指导性,还是大神们写的好,例 ...