laptop and a wrench

Bug

The MakeQueryLayer (Data Management) tool returns an error 000623 when the input_database parameter is supplied with an IWorkspace object.

Last Published: November 9, 2015 ArcObjects SDK for the Microsoft .NET Framework
Bug ID Number BUG-000088779
SubmittedJune 30, 2015
Last ModifiedJune 11, 2020
Applies toArcObjects SDK for the Microsoft .NET Framework
Version found10.2
Operating SystemWindows
Operating System Version7.0 64 Bit
StatusWill Not Be Addressed

Additional Information

This is by design. The query expression does not take a IWorkspace object.

Workaround

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;

Steps to Reproduce

Bug ID: BUG-000088779

Software:

  • ArcObjects SDK for the Microsoft .NET Framework

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options