zoukankan      html  css  js  c++  java
  • MapXtreme2004 连接oracle spatial的问题

    开发环境MapXtreme2004+C#+Oracle Spatial

    1.windows程序中连接oracle spatial方法

     1    //连接数据库oracle spatial
     2            MIConnection Connection=new MIConnection();
     3            Connection.Open();
     4            string connectionInfo = "SRVR=orcl_gissrv;UID=system;PWD=gis";
     5            ArrayList al = new ArrayList();
     6            al.Add("教学楼");
     7            al.Add("宿舍楼");
     8            al.Add("绿化设施");
     9            al.Add("其他建筑");
    10
    11            MapInfo.Data.Table [] tables=new MapInfo.Data.Table[al.Count];
    12            TableInfoServer tis;
    13            for(int i=0;i<al.Count;i++)
    14            {
    15                string tableName = (string)al[i];
    16                tis=new TableInfoServer( tableName,connectionInfo,"select * from "+tableName,MapInfo.Data.ServerToolkit.Oci);
    17                tables[i]=Connection.Catalog.OpenTable(tis);
    18            }

    19
    20            MapControl1.Map.Load(new MapInfo.Mapping.MapTableLoader(tables));
    21            Connection.Close();


    2. 在asp.net 中,这种方法行不通:

    Unable to open table.: Data access driver requested is not available: ORAINET.
    说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
  • 相关阅读:
    python小练习
    python学习笔记
    google测试之道读书笔记一
    webservice头部认证
    我们需要什么样的测试?
    pt-ioprofile在CentOS7上无法运行的解决办法
    推荐Nginx系列文章
    linux开启coredump的3种方法
    55, select/poll returned error
    centos ftp安装
  • 原文地址:https://www.cnblogs.com/xiexiaokui/p/219415.html
Copyright © 2011-2022 走看看