I have a SQL Server table whose Rawcontent is of type varbinary FileStream
TABLE [dbo].[DocTable]
(
VersionId [uniqueidentifier] NOT NULL,
RawContent [varbinary](max) FILESTREAM NULL,
Now when I am trying to get the fileStream data using :
foreach (DataRow dtr in dataTable.Rows)
{
docStream = (byte[])dtr["RawContent"];
}
Getting an exception, can not convert from System.String to System.Byte.
Why I am getting a string back while the content is saved as FileStream on SQL Server?