I’m trying to save Excel files into the database, I do not want to use filestream as it is required to have a server for that.
So how do I insert/update/select into the table that has a column of type varbinary(max)?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you want to do it in straight ADO.NET, and your Excel files aren’t too big so that they can fit into memory at once, you could use these two methods:
To retrieve the Excel sheet back and store it in a file, use this method:
Of course, you can adapt this to your needs – you could do lots of other things, too – depending on what you really want to do (not very clear from your question).