Failed to save settings due to snippet error

RedcardRedcard Posts: 1 New member
I'm getting this error everytime I attempt to save anything including Options.

Love the tool, but as work changes, I can't adjust.

Thanks,
Greg

Answers

  • Hi there,

    Thank you for contacting Redgate support and sorry to hear about your SQL Prompt snippet error.
     
    If you go to %localappdata%\Red Gate\SQL Prompt 10 and then into the Styles and Snippets folder, do you see any duplicate names? 
     
    You can check by copying the JSON files from this folder to another location and restarting SSMS to see if this clears your error. If so there is likely a duplicate entry in the folder. Take care not to delete these files as they cannot be recovered and you would need to recreate your styles and/or snippets as required.

    Kind Regards,
    David K
    Product Support Engineer

  • AlinBorosAlinBoros Posts: 6 New member
    Hi... I was having all my snippets in a separate folder, then after switching to a new laptop, fresh install, etc, try to change the snippet folder and getting the same exact error.
    There are obviously no duplicates in the folder I'm trying to change to, so what gives?
    I've tried deleting all default snippets, it doesn't help.
  • AlinBorosAlinBoros Posts: 6 New member
    So, it turns out, that it works if I select the new folder, generate the default snippets in it, then add my snippets (which include the default ones as well), most definitely creating duplicates because of the file naming convention. Can you please look into this, because it seems like a very buggy option on changing the folder.
  • AlinBorosAlinBoros Posts: 6 New member
    I figure out why I was getting the duplicate keys - as my previously used folder was continuously backed up, changes to the snippet shortcut were saved as different filename, but with the same key, which in turn was getting backed up continuously.

    In my instance, I've tried to import this backup, which included a couple of these "duplicates". So I'd say user error, but with the caveat that your error message could be more explicit which files it finds as duplicates, and/or use as key the snippet+key (as the filename), not just the key.
Sign In or Register to comment.