1

Here is a screenshot of the error I'm getting.

img

Here is the snippet I am tying to run

USE [Warehouse_PCL]
GO
/****** Object:  Table [dbo].[RouteTable]    Script Date: 2/19/2018 2:27:57 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[RouteTable](
            [BranchID] [int] NOT NULL,
            [StoreID] [int] NOT NULL,
            [WaveGroup] [int] NOT NULL,
            [Wave] [int] NOT NULL,
            [Aisle] [int] NOT NULL,
            [Lane] [int] NOT NULL,
CONSTRAINT [PK_RouteTable] PRIMARY KEY CLUSTERED 
(
            [BranchID] ASC,
            [StoreID] ASC,
            [WaveGroup] ASC,
            [Wave] ASC,
            [Aisle] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO

I am unsure what is causing this, any thouhts? Let me know if there is any other information I can provide to help.

===================================

Cannot execute script.

===================================

Object reference not set to an instance of an object. (Microsoft.VisualStudio.Editor.Implementation)

------------------------------
Program Location:

   at Microsoft.VisualStudio.Editor.Implementation.VsTextViewAdapter.SetScrollPosition(Int32 iBar, Int32 iFirstVisibleUnit)
   at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VSTextEditorTabPage.Clear()
   at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.DisplaySQLResultsControl.Clear()
   at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.DisplaySQLResultsControl.PrepareForExecution(Boolean prepareForParse)
   at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptAndResultsEditorControl.StandardPrepareBeforeExecute(QEStatusBarKnownStates newStatusBarState)
   at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.SqlScriptEditorControl.StandardPrepareBeforeExecute(QEStatusBarKnownStates newStatusBarState)
   at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptAndResultsEditorControl.OnExecScript(Object sender, EventArgs a)
5
  • 1
    The IDE is boned. No query throws a NRE. That's the application having problems. Reinstall. Commented Apr 2, 2018 at 18:54
  • 2
    What server version, and what SSMS version? This often happens when you try to connect an older version of SSMS to a newer version of SQL Server and it doesn't understand some of the server's responses. Commented Apr 2, 2018 at 18:54
  • Also, there are two icons to the bottom left of the error dialog. What's in them? Probably more information about the error that belongs in an edit. Commented Apr 2, 2018 at 18:55
  • Updated question with more details. Commented Apr 2, 2018 at 18:58
  • Agree with Will, reinstall SSMS. Commented Apr 2, 2018 at 19:04

1 Answer 1

1

This thread suggests that the problem is related to the .NET Framework update KB4055532. Try the workarounds suggested here.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.