How do I store Excel Sheet / xls file to DB2 database using C# ? I need to store the sheet to save data and preserve the template. Will Read data / fetching file from db work for all data types i.e. Pictures / Charts /Graphs ? Any tutorial online ?
Asked
Active
Viewed 1,084 times
1 Answers
1
Assuming you want to store the excel file as-is and not read the data it contains, you probably want to use the BLOB (Binary Large Object) datatype in DB2. The IBM documentation for the .NET binding is here.
If you use a BLOB, you should be able to save and restore any type of object.
EDIT:
To read and write files to byte arrays, see this question. I don't have a DB2 instance up at the moment, but the standard ADO.NET methods for reading and writing large objects should work. An example for SQL Server is here, and you should be able to swap the SQL Server classes for the DB2 classes.
-
Provides info on how to ertrieve BLOB but not how to store an Excel Work Book as BLOB in DB2. – Cannon Jun 14 '11 at 18:26