February 9, 2015 at 12:29 pm
I have a SQL Server 2012 instance / database using filestream
Everything works fine when I want to query a .txt file
select CONVERT(varbinary(max), file_stream), name
from dbo.demofiletable
The above query give me the actual text in file_stream column, along with the file name.
However, when I have a word doc in my file repository, I cannot view the contents -
Is there a way to read a .doc file that produces the same kind of result as if it were a txt file?
Text files work great, but .doc or xls do not
Thanks
Terry
February 9, 2015 at 1:26 pm
Word files are going to look normal when viewed in Word, or another application that understands the Word file format. Same with xls, PDF, and so on. The raw data is not going to look anything like it looks in the original application. Reading the files with Filestream is like opening them in Notepad, if it's not a plain text file you're not going to be happy.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply