SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Variables not displayed in list on long scripts

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
Variables not displayed in list on long scripts
Author Message
rick_townsend



Joined: 12 Oct 2009
Posts: 14
Country: New Zealand

Post Variables not displayed in list on long scripts Reply with quote
When editing a script with over 10K lines, only static objects (tables, views, etc) are displayed in the auto-complete list. Variables no longer show up in the list, and in fact pressing CTRL+SPACE after a "@" brings up the mesage "There are no local vaiables available".

To replicate:
1) create a script with "declare @a as int" on one of the first lines
2) add 10,000 blank lines
3) on line 10,000, type "set @", notice that "@a" is shown
4) on line 10,001, type "set @", notice that "@a" is shown
5) on line 10,002, type "set @", notice that no variables are shown
5) on line 10,002, type "set @" and press CTRL+SPACE, notice that the message "There are no local vaiables available" is shown.

The same behaviour seems to hold for all lines past 10,001. Note that it makes no difference if there are any "GO" batch separators in the script.

Occurred for me in a 10.5K line stored procedure that beaks aparts and validates 4,799 fields from an XML file.

SQL Assistant version 4.8.29


Last edited by rick_townsend on Mon Mar 29, 2010 11:59 pm; edited 1 time in total
Mon Mar 29, 2010 11:35 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6485

Post Reply with quote
This is by design. SQL Assistant uses various performance optimization techniques. One of them is limiting the scope of look ahead and look back code parsing. In other words, when dealing with a very long script, it is parsing only a limited number of lines relative to the cursor location. That's why after certain number of lines you may stop getting some prompts, like prompts for variable names.
Mon Mar 29, 2010 11:46 pm View user's profile Send private message
rick_townsend



Joined: 12 Oct 2009
Posts: 14
Country: New Zealand

Post Reply with quote
Could you make it a configuration setting, that just defaults to 10,000? So when we hit scripts this big we could just up the limit so it covers the range we need? I'd be willing to wait longer for parse results - better than no results at all.
Mon Mar 29, 2010 11:52 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6485

Post Reply with quote
I don't know if that's an option and I cannot answer your question right way. I'd need to run it by our development folks.
Tue Mar 30, 2010 12:06 am View user's profile Send private message
rick_townsend



Joined: 12 Oct 2009
Posts: 14
Country: New Zealand

Post Reply with quote
Ok, thanks. I've posted it on the enhancement suggestion thread.
Tue Mar 30, 2010 3:48 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.