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 ie Pictures / Charts /Graphs? Any tutorial online?
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.