How do I insert/retrieve Excel files to varbinary(max) column in SQL Server 2008?
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) ? 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: // store Excel sheet (or any file for that matter) into a SQL Server table public void StoreExcelToDatabase(string excelFileName) { // if file doesn't exist --> terminate (you might want to show a message box or something) if (