Home All Groups Group Topic Archive Search About

SQL 2005 Management Studio: File Extension: Adding: How to?

Author
17 Feb 2006 6:04 PM
Chuck Hawkins
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
out.

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.

What am I doing wrong that Management Studio doesn't treat my UDF file as a
SQL Script?

Thanks

Author
17 Feb 2006 6:16 PM
Chuck Hawkins
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
several times.

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
Script.

Chuck

Show quote
"Chuck Hawkins" <charles.hawkins@NOSPAMjenzabar.net> wrote in message
news:u3o$by%23MGHA.2696@TK2MSFTNGP14.phx.gbl...
> 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 out.
>
> 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.
>
> What am I doing wrong that Management Studio doesn't treat my UDF file as
> a SQL Script?
>
> Thanks
>
Author
17 Feb 2006 10:25 PM
Erland Sommarskog
Chuck Hawkins (charles.hawkins@NOSPAMjenzabar.net) writes:
> 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 Script.

If you already haven't, go to http://lab.msdn.microsoft.com/ProductFeedback/
and submit a bug report to make sure that Microsoft knows about it.


--
Erland Sommarskog, SQL Server MVP, esq***@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

AddThis Social Bookmark Button