|
阅读:1719回复:1
关于MapXtreme连接Oracle的问题!
<P>在MapXtreme中读取Oracle中的空间表,总是提示“ Oracle Error: OCI RC=-1, DBMS RC=12560, DBMS Msg=ORA-12560: TNS: 协议适配器错误”,不知道是什么原因,那位高人指点一下?</P>
<P>代码如下:</P> <P>string conInfo = "svr=168.100.1.100;uid=DGFMAP;pwd=DGFMAP";</P> <P>MIConnection Connection = new MIConnection();<BR> Connection.Open();<BR> MapInfo.Data.Table[] tables = new MapInfo.Data.Table[1];<BR> TableInfoServer tis1 = new TableInfoServer("USA", conInfo, "select * from USA", MapInfo.Data.ServerToolkit.Oci);<BR> tis1.CacheSettings.CacheType = CacheOption.Off; // On is the default<BR> tables[0] = Connection.Catalog.OpenTable(tis1);<BR> mapControl1.Map.Load(new MapInfo.Mapping.MapTableLoader(tables));<BR> Connection.Close();</P> |
|
|
1楼#
发布于:2007-06-04 17:20
<img src="images/post/smile/dvbbs/em01.gif" />
|
|