table表与图层之间的Join-创新互联
1.Join到SQL中的表
创新互联公司专业为企业提供静宁网站建设、静宁做网站、静宁网站设计、静宁网站制作等企业网站建设、网页设计与制作、静宁企业网站模板建站服务,十多年静宁做网站经验,不只是建网站,更提供有价值的思路和整体网络服务。
- IFeatureLayer pFeatureLayer = axMapControl1.Map.get_Layer(0) as IFeatureLayer;
- IFeatureClass pFeatureClass = pFeatureLayer.FeatureClass;
- IWorkspaceFactory pWsFact;
- IWorkspace pWorkspace;
- pWsFact = new OLEDBWorkspaceFactoryClass();
- IPropertySet pPropertySet=new PropertySetClass();
- pPropertySet.SetProperty("CONNECTSTRING", "Provider=SQLOLEDB;server=.;database=test;User Id=sa;Password=123");
- pWorkspace = pWsFact.Open(pPropertySet, 0);
- IFeatureWorkspace pFeatWS = (IFeatureWorkspace)pWorkspace;
- ITable pOleTable = pFeatWS.OpenTable(inTable);
- IMemoryRelationshipClassFactory pMemRelFact = new MemoryRelationshipClassFactoryClass();
- IRelationshipClass pRelClass = pMemRelFact.Open("", pFeatureClass, "村", (IObjectClass)pOleTable, "cunWei", "forward", "backward", esriRelCardinality.esriRelCardinalityOneToOne);
- IDisplayRelationshipClass pDispRC=pFeatureLayer as IDisplayRelationshipClass;
- pDispRC.DisplayRelationshipClass(pRelClass, esriJoinType.esriLeftOuterJoin);
创新互联www.cdcxhl.cn,专业提供香港、美国云服务器,动态BGP最优骨干路由自动选择,持续稳定高效的网络助力业务部署。公司持有工信部办法的idc、isp许可证, 机房独有T级流量清洗系统配攻击溯源,准确进行流量调度,确保服务器高可用性。佳节活动现已开启,新人活动云服务器买多久送多久。
本文名称:table表与图层之间的Join-创新互联
转载来源:http://scyanting.com/article/dshoos.html