hello all,
i am new to the filestream option in sql server 2008, but i have already understand how to open this option and how to create a table that allow you to save files. let say my table contains: id,name, filecontent
i tried to insert an html file (that has hebrew chars/text in it) to this table. i'm writing in asp.net (c#), using visual studio 2008.
but when i tried to read back the content , hebrew char becomes '?'.
the actions i took were:
1. i read the file like this:
// open the stream reader
System.IO.StreamReader aFile = new StreamReader(FileName, System.Text.UTF8Encoding.UTF8);
// reads the file to the end
stream = aFile.ReadToEnd();
// closes the file
aFile.Close();
return stream; // returns the stream
i inserted the 'stream' to the filecontent column as binary data.
i tried to do a 'select' to this column and the data did return (after i coverted it back to string) but hebrew chars become '?'
how do i solve this problem ? what I should pay attention to ?
thanks, gadym