Hello,
I am writing some data to SQL in the varchar type columns from a Lotus Notes application. I am also dealing with the Excel, doc and pdf files and storing them in the varbinary(max) type column in SQL. I have verified and binary data is being written to
SQL. One Odd thing is even though I have correct file names in the table, the File Data in the next column is always the same like this:
FileName ----------------FileData
Style1 03-23-15.xls------0x00
Style2 03-19-15.xls------0x00
Style3-26-15 v3 AR.xls---0x00
When I try to read the spreadsheets back through a download button in the gridview, they open up blanks, after giving an error that file is in wrong format, like their data has been deleted or files are corrupted. Does anyone know what's missing? Here is the
code to push data to SQL, show a gridview with the file name and download buttons:
public void GetAttachments()
{
NotesSession ses ...
Go to the complete details ...