SQLPrompt format crashes crashes ssms

Provides intelligent code completion for SQL Server editors.

Moderators: JonathanWatts, David Atkinson, Anu Deshpande, Paul Stephenson, Michelle Taylor, Mike Upton, justin.caldicott, Aaron Law

SQLPrompt format crashes crashes ssms

Postby gokhanvarol@gmail.com » Mon Mar 04, 2013 8:24 pm

Formatting the snipplet with sqlprompt crashes ssms. Please advise



CREATE TABLE #ChangedKeysChildren
(
CntyCd CHAR(5) NULL
, PclId VARCHAR(45) NULL
, PclSeqNbr TINYINT NULL
,NameSeq tinyint NULL
,BEFORE_FullName] varchar(60) NULL
,AFTER_FullName] varchar(60) NULL
)
gokhanvarol@gmail.com
 
Posts: 7
Joined: Sun Mar 03, 2013 6:09 pm

Postby Manfred.Castro » Tue Mar 05, 2013 9:44 pm

Your issue appears to be caused by the un enclosed square brackets in your script.
if you remove the un enclosed square brackets

CREATE TABLE #ChangedKeysChildren
(
CntyCd CHAR(5) NULL
, PclId VARCHAR(45) NULL
, PclSeqNbr TINYINT NULL
,NameSeq tinyint NULL
,BEFORE_FullName varchar(60) NULL
,AFTER_FullName varchar(60) NULL
)

or close the square brackets

CREATE TABLE #ChangedKeysChildren
(
CntyCd CHAR(5) NULL
, PclId VARCHAR(45) NULL
, PclSeqNbr TINYINT NULL
,NameSeq tinyint NULL
,[BEFORE_FullName] varchar(60) NULL
,[AFTER_FullName] varchar(60) NULL
)

Format SQL works as expected.
Manfred Castro
Product Support
Red Gate Software
Manfred.Castro
 
Posts: 209
Joined: Mon Apr 23, 2012 2:49 pm

The crash

Postby gokhanvarol@gmail.com » Tue Mar 05, 2013 9:49 pm

I know how to make it work by removing the bracket, but in any case sql prompt should not crash and take ssms down with it.
This piece of code was part of a longer (over 4500 lines) stored procedure which kept crashing on format, eventually I spent the time and find out what's crashing sqlprompt and posted here.
gokhanvarol@gmail.com
 
Posts: 7
Joined: Sun Mar 03, 2013 6:09 pm

Postby PDinCA » Tue Mar 05, 2013 11:04 pm

SSMS2012 simply spins its wheels - the Cancel button in the reformat dialog is inoperative. Killing SSMS is the only solution.

I agree with the original poster - SQL Prompt ==> format SQL should NEVER kill SSMS of any vintage.
PDinCA
 
Posts: 517
Joined: Mon Jul 25, 2005 11:42 pm
Location: Costa Mesa, CA, USA

Postby Manfred.Castro » Wed Mar 06, 2013 12:35 am

We have this logged in our bug tracking system under the internal reference number SP-4639
Manfred Castro
Product Support
Red Gate Software
Manfred.Castro
 
Posts: 209
Joined: Mon Apr 23, 2012 2:49 pm


Return to SQL Prompt 5

Who is online

Users browsing this forum: No registered users and 1 guest