Mgmt Studio: File Extensions: Adding new Query Editor extension results in unrecognized original file
This was initially written about in the microsoft.public.sqlserver.tools newsgroup on 2/17/2006 at 1:04 PM under the title "SQL 2005 Management Studio: File Extension: Adding: How to?"
I'm working with GA Management Studio on Windows XP SP2.
I have a file with a UDF file extension (user-defined function). When I open
the file in Management Studio, I cannot execute the file.
I'm going to Tools-Options, Text Editor, File Extensions. I then add the UDF
extension with the SQL Query Editor Editing Experience. Click OK, etc. When
I do so, nothing happens. Restarting Management Studio has no effect. I
can't execute the script as a SQL Script.
I add the SQL Editor toolbar (View-Toolbars) and the whole toolbar is grayed
I have a lot of files that don't have standard SQL file extensions (TAB,
VIW, PRC, UDF, TRI, etc...). In SQL 2000 Query Analyzer, it was easy to
associate these file extensions as SQL script files.
It gets a little more mysterious. But the good thing is that my file now
"knows" itself as a SQL Script.
I had initially opened the UDF file in Management Studio. Then I added UDF
as a recognized extension. Then every other UDF file that I opened was a
recognized SQL Script. Only the initial file that I opened didn't know it
was a SQL Script. This despite stopping and restarting Management Studio
I changed the name of the original UDF, opened it, and it "knew" itself as a
SQL Script. Then I changed the name back to the original name, and it still
knew itself as a SQL Script.
Apparently a small bug with that Management Studio. I just demonstrated the
same thing with two files of file extension UDT. The first file that was
active when UDT was registered as a SQL Query Editor type refuses to be
recognized as such. The second (and I would assume later) come up as a SQL
Upvotes: 0<=-=Feb 21 2006 5:32PM=-=>
Thanks for the feedback and we will address this in future release<=-=Apr 24 2006 10:28AM=-=>
We attempted to reproduce the bug you reported but were not able to do so. Following your steps to reproduce yielded the expected results – the second file with the custom extension was recognized as a SQL Query Editor file. Opening the file prompted us for a connection and allowed us to execute the script. If you are still hit this bug please re-activate this bug with the updated steps to reproduce the problem.