• 大小: 24.46MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-07-10
  • 语言: C#
  • 标签: AEOracle  

资源简介

C#写的,AE的MapControl可以直接加载Oracle数据(C#),最主要的是,不用安装sde,也不用安装Oracle客户端。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.DataSourcesGDB;
using ESRI.ArcGIS.esriSystem;

namespace AE_addOGRlayer
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender EventArgs e)
        {
            string strSystemPath = Environment.GetEnvironmentVariable(“PATH“);
            if (!strSystemPath.Contains(Application.StartupPath))
                System.Environment.SetEnvironmentVariable(“PATH“ Application.StartupPath + “\\bin;“ + strSystemPath);
            System.Environment.SetEnvironmentVariable(“ORACLE_HOME“ Application.StartupPath);
            System.Environment.SetEnvironmentVariable(“NLS_LANG“ “SIMPLIFIED CHINESE_CHINA.ZHS16GBK“);
            //string strSytemmPathNew = Environment.GetEnvironmentVariable(“PATH“);

            IWorkspaceFactory pWorkspaceFactory = new FileGDBWorkspaceFactory();
            IPropertySet pPropertySet = new PropertySetClass();
            pPropertySet.SetProperty(“Instance“ “sde:oracle11g:192.168.1.105/orcl“);//数据库类型、地址、服务名等参数
            pPropertySet.SetProperty(“User“ “username“);//数据库用户名
            pPropertySet.SetProperty(“Password“ “password“);//数据库密码
            SdeWorkspaceFactoryClass sdeclass = new SdeWorkspaceFactoryClass();
            IWorkspace pWorkspace = sdeclass.Open(pPropertySet 0);
            IFeatureWorkspace pFeatureWorkspace = pWorkspace as IFeatureWorkspace;
            IFeatureClass pFeatureClass = pFeatureWorkspace.OpenFeatureClass(“tablename“);//数据库中的表名

            IFeaturelayer pFeaturelayer = new FeaturelayerClass();
            pFeaturelayer.FeatureClass = pFeatureClass;
            ilayer player = pFeaturelayer;
            player.Name = “tablename“;
            axMapControl1.Map.Name = “图层列表“;
            axMapControl1.Addlayer(player);
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       6670  2016-08-30 17:23  AE_addOGRlayer\AE_addOGRlayer\AE_addOGRlayer.csproj

     文件      15360  2016-09-01 11:50  AE_addOGRlayer\AE_addOGRlayer\bin\Debug\AE_addOGRlayer.exe

     文件      19968  2016-09-01 11:50  AE_addOGRlayer\AE_addOGRlayer\bin\Debug\AE_addOGRlayer.pdb

     文件      11600  2016-09-01 11:50  AE_addOGRlayer\AE_addOGRlayer\bin\Debug\AE_addOGRlayer.vshost.exe

     文件        490  2010-03-17 22:39  AE_addOGRlayer\AE_addOGRlayer\bin\Debug\AE_addOGRlayer.vshost.exe.manifest

     文件     987136  2010-04-02 07:42  AE_addOGRlayer\AE_addOGRlayer\bin\Debug\BIN\oci.dll

     文件     253952  2010-04-02 03:18  AE_addOGRlayer\AE_addOGRlayer\bin\Debug\BIN\oracell11.dll

     文件    3780608  2010-04-02 08:02  AE_addOGRlayer\AE_addOGRlayer\bin\Debug\BIN\oraclient11.dll

     文件    2301952  2010-04-02 08:01  AE_addOGRlayer\AE_addOGRlayer\bin\Debug\BIN\oracommon11.dll

     文件     978944  2010-02-09 17:01  AE_addOGRlayer\AE_addOGRlayer\bin\Debug\BIN\oracore11.dll

     文件   12615680  2010-04-02 08:03  AE_addOGRlayer\AE_addOGRlayer\bin\Debug\BIN\orageneric11.dll

     文件    3678208  2010-04-01 11:53  AE_addOGRlayer\AE_addOGRlayer\bin\Debug\BIN\orahasgen11.dll

     文件    1613824  2010-01-29 04:50  AE_addOGRlayer\AE_addOGRlayer\bin\Debug\BIN\oraldapclnt11.dll

     文件    4190208  2010-03-31 07:56  AE_addOGRlayer\AE_addOGRlayer\bin\Debug\BIN\oran11.dll

     文件       7680  2010-03-31 07:54  AE_addOGRlayer\AE_addOGRlayer\bin\Debug\BIN\orancds11.dll

     文件     118784  2010-03-31 07:56  AE_addOGRlayer\AE_addOGRlayer\bin\Debug\BIN\orancrypt11.dll

     文件      34816  2010-03-31 07:56  AE_addOGRlayer\AE_addOGRlayer\bin\Debug\BIN\oranhost11.dll

     文件     397312  2010-03-31 07:56  AE_addOGRlayer\AE_addOGRlayer\bin\Debug\BIN\oranl11.dll

     文件     311296  2010-03-31 07:56  AE_addOGRlayer\AE_addOGRlayer\bin\Debug\BIN\oranldap11.dll

     文件     815104  2010-02-10 06:03  AE_addOGRlayer\AE_addOGRlayer\bin\Debug\BIN\oranls11.dll

     文件    1249280  2010-01-29 04:51  AE_addOGRlayer\AE_addOGRlayer\bin\Debug\BIN\orannzsbb11.dll

     文件     307200  2010-03-31 07:56  AE_addOGRlayer\AE_addOGRlayer\bin\Debug\BIN\oranro11.dll

     文件     217088  2010-03-31 07:56  AE_addOGRlayer\AE_addOGRlayer\bin\Debug\BIN\orantcp11.dll

     文件      51200  2010-03-31 07:56  AE_addOGRlayer\AE_addOGRlayer\bin\Debug\BIN\orantns11.dll

     文件     647168  2010-04-01 09:10  AE_addOGRlayer\AE_addOGRlayer\bin\Debug\BIN\oraocr11.dll

     文件     770048  2010-04-01 09:10  AE_addOGRlayer\AE_addOGRlayer\bin\Debug\BIN\oraocrb11.dll

     文件      40960  2010-04-01 09:09  AE_addOGRlayer\AE_addOGRlayer\bin\Debug\BIN\oraocrutl11.dll

     文件      94208  2010-04-02 08:00  AE_addOGRlayer\AE_addOGRlayer\bin\Debug\BIN\oraplc11.dll

     文件    2949120  2010-04-02 08:01  AE_addOGRlayer\AE_addOGRlayer\bin\Debug\BIN\oraplp11.dll

     文件    4067328  2010-04-02 08:00  AE_addOGRlayer\AE_addOGRlayer\bin\Debug\BIN\orapls11.dll

............此处省略870个文件信息

评论

共有 条评论

相关资源