Map Document Data Source connection to Personal or Workgroup SDE broken when using IDataServerManager.
上次发布: August 25, 2014No Product Found
漏洞 ID 编号
NIM006847
已提交
February 14, 2007
上次修改时间
June 5, 2024
适用范围
No Product Found
找到的版本
9.2
编程语言
C#
修正版本
9.3
状态
Fixed
此漏洞已得到修复。 有关详细信息,请参阅“版本修复”和“其他信息”(如果适用)。
解决办法
Using the connection file through IDataServerManager::InitFromFile does not cause this problem.string strPath = "<a href="file:c://Temp//" target="_blank">c:\\Temp\\</a>";string strServerName = @"alagiri\sqlexpress";IDataServerManager pDSManager = new DataServerManagerClass();string strFileName = strServerName.Replace("\\", "_") + ".GDS";//check if the connection file exists if not create one in the temp folder.if (!<a href="http://System.IO" target="_blank">System.IO</a>.File.Exists(strPath + strFileName)){ pDSManager.ServerName = strServerName; //'Connect to the Data Server pDSManager.Connect(); pDSManager.CreateConnectionFile(strPath, pDSManager.ServerName); pDSManager.Disconnect();}//Initialize the data serverpDSManager.InitFromFile(strPath + strFileName);