我用的是SqlServer2005我在AdventureWorks数据库中执行SELECT SalesOrderID, OrderQTY 
     FROM Sales.SalesOrderDetail
WHERE ProductID = 712
ORDER BY OrderQTY DESC这天查询语句后,在“查询”菜单上选择“显示估计的执行计划”显示这个查询的执行计划,不能显示执行计划,显示如图当我再一次执行查询的时候,就出现错误详细信息如下:无法执行脚本。===================================未将对象引用设置到对象的实例。 (SQLEditors)------------------------------
程序位置:   在 Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ShowPlan.ShowPlanControl.Dispose(Boolean disposing)
   在 System.ComponentModel.Component.Dispose()
   在 Microsoft.SqlServer.Management.UI.VSIntegration.Editors.TabPages.ShowPlanTabPage.Dispose(Boolean disposing)
   在 System.ComponentModel.Component.Dispose()
   在 Microsoft.SqlServer.Management.UI.VSIntegration.Editors.DisplaySQLResultsControl.ClearTabs()
   在 Microsoft.SqlServer.Management.UI.VSIntegration.Editors.DisplaySQLResultsControl.PrepareTabs(Boolean bParseOnly)
   在 Microsoft.SqlServer.Management.UI.VSIntegration.Editors.DisplaySQLResultsControl.PrepareForExecution(Boolean prepareForParse)
   在 Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptAndResultsEditorControl.StandardPrepareBeforeExecute(QEStatusBarKnownStates newStatusBarState)
   在 Microsoft.SqlServer.Management.UI.VSIntegration.Editors.SqlScriptEditorControl.StandardPrepareBeforeExecute(QEStatusBarKnownStates newStatusBarState)
   在 Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptAndResultsEditorControl.OnExecScript(Object sender, EventArgs a)
请教高手怎么解决?

解决方案 »

  1.   

    Microsoft.SqlServer.Management.UIUI是啥???重装一次试试??
      

  2.   


    [sql server]查看已经安装的SQLSERVER实例名
    http://blog.csdn.net/xys_777/archive/2010/07/07/5717393.aspx
      

  3.   


    我查了,有
    MSSQLSERVER
    SQLEXPRESS
    两个实例,有影响吗?
    我把我的代码弄到别的电脑上执行计划,就行!
    SELECT SalesOrderID, OrderQTY 
         FROM Sales.SalesOrderDetail
    WHERE ProductID = 712
    ORDER BY OrderQTY DESC
    就是这条sql语句!
    我按ctrl+L,执行计划,它只是显示出一条消息:影响一行,我第二次按ctrl+L,执行计划的时候就出现如下情况:请教,这个该怎么解决啊?