Editing the RedGate_SqlPrompt_Engine_EngineOptions.xml file causes error
I am using SQL Prompt 10.14.12.7945 on an Azure SQL Server DB in the cloud. There are 126 tables and 52 views to which I want to assign unique aliases. I know I can add them manually in the Options form, but instead I would like to generate the XML for them in VBA, and add that to the XML file : RedGate_SqlPrompt_Engine_EngineOptions.xml.
However, when I save the updated file using Notepad++ or VS2022 and then restart SSMS it comes up with this error message “Data at the root level is invalid. Line 1, position 1”.
Can anyone suggest why this is, and how to get around it, as the XML is validated.
TIA for any help
Answers
For this example below
it is stored as
You can close SSMS, manually edited the XML directly to add another entry and then restart SSMS (just be sure to increase the count as well when you drop in another encoded XML alias chunk):
Bodders
It will need to be in that exact format, or it will not work.
However, I cannot speak for if VBA would add these.