The MakeQueryLayer (Data Management) tool returns an error 000623 when the input_database parameter is supplied with an IWorkspace object.
上次发布: November 9, 2015ArcObjects SDK
漏洞 ID 编号
BUG-000088779
已提交
June 30, 2015
上次修改时间
February 11, 2025
适用范围
ArcObjects SDK
找到的版本
10.2
操作系统
Windows OS
操作系统版本
7.0 64 Bit
状态
Will Not Be Addressed
开发团队已考虑过该问题或请求,并决定不会解决该问题。 问题的“其他信息”部分可能包含进一步说明。
附加信息
This is by design. The query expression does not take a IWorkspace object.
解决办法
1. If using a connection string or property set to open the workspace using the connection information to create a connection file on disk and then utilize this connection path to execute the MakeQueryLayer tool.
2. Create the QueryLayer in ArcObjects without using the GeoProcessor as shown below:
var factoryType = Type.GetTypeFromProgID("esriDataSourcesGDB.SdeWorkspaceFactory");
var wsf = Activator.CreateInstance(factoryType) as IWorkspaceFactory;
var workspace = wsf.Open(propSet, 0) as ISqlWorkspace;
var query = string.Format("SELECT {0} FROM {1}", "*", TableName);
var queryDesc = workspace.GetQueryDescription(query);
queryDesc.OIDFields = ObjectID;
string name;
workspace.CheckDatasetName(TableName, queryDesc, out name);
var featClass = workspace.OpenQueryClass(name, queryDesc) as IFeatureClass;