网站建设资讯

NEWS

网站建设资讯

table表与图层之间的Join

1.Join到SQL中的表

站在用户的角度思考问题,与客户深入沟通,找到陈仓网站设计与陈仓网站推广的解决方案,凭借多年的经验,让设计与互联网技术结合,创造个性化、用户体验好的作品,建站类型包括:做网站、网站制作、企业官网、英文网站、手机端网站、网站推广、空间域名、网站空间、企业邮箱。业务覆盖陈仓地区。

  1. IFeatureLayer pFeatureLayer = axMapControl1.Map.get_Layer(0) as IFeatureLayer;  
  2.            IFeatureClass pFeatureClass = pFeatureLayer.FeatureClass;  
  3.            IWorkspaceFactory pWsFact;  
  4.            IWorkspace pWorkspace;   
  5.            pWsFact = new OLEDBWorkspaceFactoryClass();  
  6.            IPropertySet pPropertySet=new PropertySetClass();  
  7.            pPropertySet.SetProperty("CONNECTSTRING", "Provider=SQLOLEDB;server=.;database=test;User Id=sa;Password=123");  
  8.            pWorkspace = pWsFact.Open(pPropertySet, 0);  
  9.            IFeatureWorkspace pFeatWS = (IFeatureWorkspace)pWorkspace;  
  10.            ITable pOleTable = pFeatWS.OpenTable(inTable);  
  11.            IMemoryRelationshipClassFactory pMemRelFact = new MemoryRelationshipClassFactoryClass();  
  12.            IRelationshipClass pRelClass = pMemRelFact.Open("", pFeatureClass, "村", (IObjectClass)pOleTable, "cunWei", "forward", "backward", esriRelCardinality.esriRelCardinalityOneToOne);  
  13.            IDisplayRelationshipClass pDispRC=pFeatureLayer as IDisplayRelationshipClass;  
  14.            pDispRC.DisplayRelationshipClass(pRelClass, esriJoinType.esriLeftOuterJoin); 

 


分享题目:table表与图层之间的Join
当前链接:http://cdweb.net/article/ihssjd.html