How can we help you today? How can we help you today?

Exception thrown when typing aggregate functions

I get the following errors when typing any aggregate or system function such as COUNT(), SUM(), or ROW_NUMBER(). I usually see:
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at RedGate.SqlPrompt.Engine.SqlPromptEngine.ParameterPrompt()
   at RedGate.SQLPrompt.CommonUI.Editor.EditorWindowBase.OnCaretPoitionChanged()
   at RedGate.SQLPrompt.CommonVS.Editor.TextViewMonitor.Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.Exec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)

But sometimes I end up with:

************** Exception Text **************
System.ArgumentNullException: Database must not be null.
Parameter name: database
   at RedGate.SQLCompare.Engine.DatabaseObjectResolver..ctor(Database database)
   at RedGate.SqlPrompt.Engine.SqlPromptEngine.ParameterPrompt()
   at RedGate.SQLPrompt.CommonUI.Editor.EditorWindowBase.OnCaretPoitionChanged()
   at RedGate.SQLPrompt.CommonVS.Editor.TextViewMonitor.Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.Exec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)

It does appear to only happen on connections that SQL Prompt does not connect to, or during the cache refresh with a new connection. Then, often after a few minutes, the problem disappears. It's really pretty annoying!

My version is 3.8.0.244 and I'm using MSSMS 9.00.3042.00 on Vista. Anyone else getting this issue?
Jason Hannas
0

Comments

3 comments

  • tanya
    Hi,

    Apologies for the trouble you are facing.
    Please contact support@red-gate.com for the fix to this issue.

    Thanks,
    Tanya
    tanya
    0
  • HondaMX
    I'm getting a similar issue in VS2008.
    HondaMX
    0
  • Tom Harris
    Hi there,

    we have now released SQL Prompt 3.9. This public release contains a fix for this issue. You can download the latest version of SQL Prompt from our product pages, or use 'Check for Updates' from the SQL Prompt menu in your editor.

    Thanks, Tom

    Tom Harris
    Red Gate Software
    Tom Harris
    0

Add comment

Please sign in to leave a comment.