SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
code formatting issue in SSMS

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
code formatting issue in SSMS
Author Message
SqlerOl



Joined: 13 Apr 2007
Posts: 8

Post code formatting issue in SSMS Reply with quote
1. Create a procedure:
Code:

use MyDatabase

CREATE PROCEDURE dbo.xusp_SYS_SynchroMarkSet
  @MarkName nvarchar(128)
AS
BEGIN
  PRINT 'dbo.xusp_SYS_SynchroMarkSet'
END


2. Type in SSMS:
EXEC My[choose from popup].d[choose from popup].x[choose from popup]

3. Code formatting will be applied and you'll see:
Code:

EXEC MyDatabase.dbo.xusp_SYS_SynchroMarkSet
  @MarkName = null


I want to see:
Code:

EXEC MyDatabase.dbo.xusp_SYS_SynchroMarkSet @MarkName = ?


Changing formatting rule, disabling formatting rule by unchecking appropriate check box and even deleting formatting rule doesn't help.
More of that, it will be useful to have an option not to insert parameters at all.
Fri Apr 13, 2007 4:33 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7839

Post Reply with quote
Thanks for the bug report.

In theory you should be able to change the formatting rule moving the parameter to the first line that should produce the effect you want. I'm not sure why it doesn't work this way. I am going to send this issue to developers for further investigation.


Note that the purpose of formatting patterns is to give you control over how the resulting code should look.
Fri Apr 13, 2007 5:35 pm View user's profile Send private message
SqlerOl



Joined: 13 Apr 2007
Posts: 8

Post Reply with quote
You see, that is a good idea. But I prefer to enter code myself in my preferred manner. I just want to get some help, but I don't need some software to do my job :)

Now I turned "Code formatting" option to None and deleted ALL formatting snippets and rules, as the result, keywords are not converted into upper case. BUT: when I'm typing "INSERT INTO bla-bla-bla" and then choosing something from popup menu, I'm getting complete insert snippet :(. It seems to me that this was either hardcoded or is stored somewhere...
Fri Apr 13, 2007 5:52 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7839

Post Reply with quote
All you actually needed to do is to change one option on the Targets page:


Fri Apr 13, 2007 8:26 pm View user's profile Send private message
SqlerOl



Joined: 13 Apr 2007
Posts: 8

Post Reply with quote
Been there, done that :)

It turns of keywords "uppercasing" as well :( And it doesn't turns off formatting (see previous post). I think that it can be an installation issue - I'll check it on another computer after weekend...
Fri Apr 13, 2007 8:43 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7839

Post Reply with quote
I think you are trying to disable the code auto-expansion feature. I don't think there is a facility in the options to disable this. I am going to add an enhancement request on your behave to provide an option for disabling code auto-expansion.

As a workaround for SELECT statements, you can simply skip the first popup appearing after SELECT keyword and use the second popup appearing after FROM keyword
Sat Apr 14, 2007 1:09 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7839

Post Reply with quote
Sorry, forgot to mention existence of undocumented option for use of the Shift key when selecting object names in the popup. If you hold the Shift key down when picking an object, the code auto-expansion is not used
Sun Apr 15, 2007 2:16 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.