Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

file cannot be opened

Status
Not open for further replies.

sagn

Programmer
Jun 7, 2001
166
US
HI

I have executed a query and had SQLServer output data to a file. When I try to open the file using TextPad, it says it cannot be opened. I can open it with NotePad and WordPad. I see nothing strange in the file.

What's more when I try and read this file using FORTRAN
nothing is read in, yet I get no errors upon opening or reading.

A file containing the same data but created using SQLserver200 can be read.

Any idea what is going on here? This is driving me crazy!

Thanks
 
Oh I am using SQLServer2005...

sorry
 
How are you creating the file?

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
I tried two ways.

Using Results to File Option under QUERY

And also, RESULTS to text which I then cut and pasted.

thanks
 
It might have something to do with ANSI settings. ANSI has changed between 2000 and 2005 (I don't remember the exact details), but it could be when you use "Results To File" that it is doing some sort of Unicode dump to the file and your other apps are trying to read it as ANSI.



Catadmin - MCDBA, MCSA
"No, no. Yes. No, I tried that. Yes, both ways. No, I don't know. No again. Are there any more questions?"
-- Xena, "Been There, Done That"
 
Hmm Interesting idea...

I will look into that. In the meantime, I continue to welcome suggestions and ideas!

thanks
 
Try using BCP or SSIS to dump the data to the text file.

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top