dbTalk Databases Forums  

??? SSMS 2008 Cannot Open *.sql Files ???

microsoft.public.sqlserver.clients microsoft.public.sqlserver.clients


Discuss ??? SSMS 2008 Cannot Open *.sql Files ??? in the microsoft.public.sqlserver.clients forum.



Reply
 
Thread Tools Display Modes
  #51  
Old   
Tom Baxter
 
Posts: n/a

Default Re: ??? SSMS 2008 Cannot Open *.sql Files ??? - 10-02-2008 , 09:40 AM






Hi all,

It turns out that Peter Gibbons was exactly right. I edited the the SQL file
and when I saved it my editor removed the BOM. The result was SSMS could not
open the file.

If I recall correctly, BOM is optional. I wouldn't think SSMS should refuse
to open a file simple because the BOM is missing.

Thanks to all who responded.


"Gail Erickson [MS]" <gaile (AT) online (DOT) microsoft.com> wrote

Quote:
I can reproduce the errors you're getting. Which Codeplex URL did you
download the script from?

--
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
Download the latest version of SQL Server 2005 Books Online from
http://technet.microsoft.com/en-us/s.../bb428874.aspx
Download the latest version of SQL Server 2008 Books Online from
http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
"Tom Baxter" <tlbaxter99 (AT) yahoo (DOT) com> wrote in message
news:ev0QUSAJJHA.3424 (AT) TK2MSFTNGP05 (DOT) phx.gbl...
"Roy Harvey (SQL Server MVP)" <roy_harvey (AT) snet (DOT) net> wrote in message
news:59m7e4tal56ksvqdt3n6e5eh82lev201r2 (AT) 4ax (DOT) com...
On Wed, 1 Oct 2008 15:02:07 -0500, "Tom Baxter" <tlbaxter99 (AT) yahoo (DOT) com
wrote:

This is depressing. I'm using Vista Business Ed.

I have SQL Server 2008 Standard Ed. installed along with SS Management
Studio. When I double-click a *.sql file in Windows Explorer I receive
this
dialog message:
---------------------------
Microsoft SQL Server Management Studio
---------------------------
There is no editor available for 'C:\Users\tbaxter\Desktop\SQL
Server
Sample Scripts\Tools\Samples\AdventureWorks 2008 OLTP\instawdb.sql'.

Make sure the application for the file type (.sql) is installed.

In my file associations I have checked that *.sql files are associated
with
SSMS. Just for the heck of it I dis-associated and then re-associated
*.sql
files with SSMS but still I get this error.

For now I have to open my *.sql files in notepad and copy their contents
to
the clipboard and then paste into a query window.

Has anyone else seen this behavior?

I have not had that problem, but then I never double-clock on .sql
files. Management Studio is working fine? If so you should be able
to start it and then use File / Open.



This is very, very curious indeed!

The problem seems to come from the "instawdb.sql" file in the
"Tools\Samples\AdventureWorks 2008 OLTP" that comes with one of the
AdventureWorks scripts. I get the error even if I try to open the file
via
"File | Open".

All other *.sql files seem to open fine.

I have attached the offending script. Can someone else please try to open
it
in SSMS 2008 and see if you get the error?

Thanks.







Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.