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 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

你可能感兴趣的:(oracle)