表连接查询
来源:互联网 发布:迅捷绑定mac地址 编辑:程序博客网 时间:2024/06/10 21:57
AE中查询主要的接口有IQueryFilter,ISpatialQuery,IQueryDef这三个接口。其中ISpatialQuery主要是空间查询。其中IQueryDef可以进行多表查询,IQueryDef.Table为要查询表的名称,多个表用,隔开。IQueryDef2接口继承于IQueryDef,并增加了PostfixClause属性,这个属性主要是用来排序的。例如ORDER BY Pop1996,另外还有个PrefixClause属性。主要用来定义DISTINCT这个关键字 ,更SQL中的一样。查询结果是只读的无法对其修改。
IQueryDef2 queryDef2 = (IQueryDef2)featureWorkspace.CreateQueryDef();// Specify the table and fields to query.queryDef2.Tables = "Cities";queryDef2.SubFields = "Name, Pop1996"; //注意PostfixClause中的字段必须出现在SubFields属性中 否则会报错queryDef2.PostfixClause = "ORDER BY Pop1996 DESC";// Execute the query.using (ComReleaser comReleaser = new ComReleaser()){ ICursor cursor = queryDef2.Evaluate2(true); comReleaser.ManageLifetime(cursor); int nameIndex = cursor.FindField("Name"); int pop1996Index = cursor.FindField("Pop1996"); IRow row = null; while ((row = cursor.NextRow()) != null) { String cityName = Convert.ToString(row.get_Value(nameIndex)); //结果只读 无法修改 int population = Convert.ToInt32(row.get_Value(pop1996Index)); Console.WriteLine("{0}: {1}", cityName, population); }}
0 0
- 多表查询----连接查询
- 多表连接查询
- 表连接查询分类
- 表连接查询分类
- sql表连接查询
- 多表连接查询
- 多表连接查询
- 表连接 联合查询
- 多表连接查询
- 多表连接查询
- 三表连接查询
- 多表连接查询
- 多表连接查询
- 多表连接查询
- 多表查询 连接
- 简单表连接查询
- MySQL 查询 -- 表连接
- MySQL 查询 -- 表连接
- Qt下载地址
- test
- Sublime Text3插件Clang-Complete的安装
- 一些高薪职位的能力需求。
- iOS中SVN使用
- 表连接查询
- 多线程示例模仿
- 数据结构课程设计
- Windows 环境下配置MXNET教程
- Android Makefile 文件讲解
- dubbo 集成restful协议
- [易飞]进销存统计表
- uiscrollview_和_滑动返回冲突解决
- 一共81个,开源大数据处理工具汇总