Exception has been thrown by the target of an invocation

I am getting an error when trying to open a query result into Excel or script it into an Insert. This started happening after the last update or SQL Prompt. I am now running version 10.6.9.19437. These are the errors I am getting

2021-04-27 09:18:18.286 -04:00 [Error] Report error dialog UI shown
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at RedGate.SQLPrompt.CommonVS.ResultsGrid.OpenInExcel.OpenInExcelController.DoFailedAction(Exception exception, OpenInExcelProgressDialog progressDialog)
   at RedGate.SQLPrompt.CommonVS.ResultsGrid.OpenInExcel.OpenInExcelController.<>c__DisplayClass13_0.<DoFailedAction>b__0()
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at RedGate.SQLPrompt.CommonUI.Utils.UIThreadInvoker.<>c__DisplayClass6_0.<BeginInvoke>b__1()
   at RedGate.SQLPrompt.UsageReporting.ErrorReporting.ErrorReporterWithUI.Do(Action action)
2021-04-27 09:19:00.636 -04:00 [Error] Report error dialog UI shown
System.NullReferenceException: Object reference not set to an instance of an object.
   at RedGate.SqlPrompt.Core.Utils.ReflectionUtils.TryGetPropertyValue[TValue](Object instance, String property, TValue& value)
   at RedGate.SQLPrompt.CommonUI.Editor.ResultsGrid.ResultsWindow.PopulateCell(ResultsGridColumn column, Int64 rowNumber, Object resultsSet)
   at RedGate.SQLPrompt.CommonUI.Editor.ResultsGrid.ResultsWindow.<>c__DisplayClass5_0.<CreateResultsGridSelection>b__1(ResultsGridColumn columnNumber, Int64 rowNumber)
   at RedGate.SQLPrompt.CommonUI.Editor.ResultsGrid.ResultsGridSelection.<PopulateSelectionWithData>d__21.MoveNext()
   at RedGate.SQLPrompt.CommonUI.Editor.ResultsGrid.ScriptAsInsert.CreateInsertBody(ResultsGridSelection selection, StreamWriter writer)
   at RedGate.SQLPrompt.CommonUI.Editor.ResultsGrid.ScriptAsInsert.ScriptResults(IEnumerable`1 selections, Stream stream)
   at RedGate.SQLPrompt.CommonUI.Commands.ScriptAsInsertController.Execute()
   at RedGate.SQLPrompt.CommonPackageCommands.OleCommandScriptAsInsert.Execute()
   at RedGate.SQLPrompt.CommonPackageCommands.PromptOleMenuCommand.<>c__DisplayClass4_0.<Execute>b__0()
   at RedGate.SQLPrompt.UsageReporting.ErrorReporting.ErrorReporterWithUI.Do(Action action)

Is there a work around or fix available? I need this functionality back asap.

Thank you
Tagged:

Answers

Sign In or Register to comment.