Maximize the power of SQL Prompt with SQL Toolbelt Essentials. Watch now.

END highlight gets confused by BEGIN DIALOG

PDinCAPDinCA Posts: 642 Silver 1
edited February 26, 2015 7:48AM in SQL Prompt

Using a reformatted snippet from Denny Cherry's Blog, SQL Prompt mistakenly highlights the BEGIN of the BEGIN DIALOG when the cursor is clicked on the last END;

S/B highlighting the first BEGIN exhibited below.
IF CAST(RAND() * 100 AS int) = 0
      OR @DialogHandle IS NULL
            IF @DialogHandle IS NOT NULL
                  SEND ON CONVERSATION @DialogHandle
                       MESSAGE TYPE [MT_ConversationSwitch]

            BEGIN DIALOG CONVERSATION @dialogHandle
             FROM SERVICE [Svc_ObjectDelete_Source]
               TO SERVICE 'Svc_ObjectDelete_Destination'
               ON CONTRACT [CT_ObjectDelete_Multi];

            UPDATE Setting
               SET DefaultValue = @DialogHandle
             WHERE SettingName = 'SSB_Session_Delete';

Jesus Christ: Lunatic, liar or Lord?
Decide wisely...


  • Aaron LAaron L Posts: 596 New member
    Hi Stephen,

    Thanks for letting us know about this! We've been able to reproduce it here and we'll include a fix in our next release.


    EDIT: The latest 6.5 beta now correctly resolves the BEGIN/END pairs with BEGIN DIALOG in the pair
Sign In or Register to comment.