Variables aren't suggested after x number of lines

jamaljamal Posts: 47 Bronze 3
edited January 20, 2011 4:46PM in SQL Prompt Previous Versions
I find that about 125 lines away from where I've declared variables SQL Prompt no longer knows of their existence. Is it possible to customize this so that SQL Prompt reads the entire file even if that makes it slower? :?:
James

Comments

  • Hi James,

    For performance reasons, the SQL Prompt parser only looks back a certain number of characters to find variable declarations.

    By default, this is 5000 characters, but if you are happy editing XML files then it can be changed:

    1. Open up "%LOCALAPPDATA%\Red Gate\SQL Prompt 5\RedGate_SqlPrompt_Engine_EngineOptions.xml" in a text editor.
    2. Find the tag <ParserLookBackDistance>.
    3. Increase the number in the tag from 5000 to something bigger like 30000.

    Please be aware that very large values of this option have not been thoroughly tested and may cause performance degradation, so use with caution.

    Regards,
    Paul
    Paul Stephenson
    Project Manager, Red Gate
  • jamaljamal Posts: 47 Bronze 3
    Great, thanks! Long ago, maybe in version 3, wasn't this an option?
    James
  • ....Red Gate\SQL Prompt 5\RedGate_SqlPrompt_Engine_EngineOptions.xml

    Has this filename changed in 5.0.1? I have not been able to find it using Windows' search function. I searched for all xml files containing ParserLookBackDistance and came up empty.
  • jamaljamal Posts: 47 Bronze 3
    I just upgraded and it's still in the same location (I'm running windows 7).

    Go here: %LOCALAPPDATA%\Red Gate\SQL Prompt 5
    James
  • The file is located here for me (using Windows XP Pro), if that helps:
    C:\Documents and Settings\%Current User%\Local Settings\Application Data\Red Gate\SQL Prompt 5.
Sign In or Register to comment.