views:

39

answers:

2

Hi SO,

I'm writing a c# app that inserts a large (1GB+) amount of data into a BLOB in an informix database.

However, many times the file is too large and the process runs out of memory. I have implemented the WCF Chunking Channel to mitigate this, but I need to put these chunks into the BLOB without consuming memory to store them all.

How might I go about appending these chunks to the blob as they come in instead of buffering them all in memory first?

TIA!

A: 

I'm not sure how it translates to C#, but I think an ESQL/C solution is illustrated in the ESQL/C Reference Manual Appendix C and the LO (large object) functions are listed in Appendix B, while Chapter 8 describes how to use them all.

The Informix .NET Provider Guide (manual) has a section 'Type Reference' including a description of the IfxBlob class.

With luck, one or more of these should help you find the answers you need.

Jonathan Leffler
A: 

as it turns out, the IfxBlob classes Write method seems to write it directly to a LOB on the database server and seems to skip memory entirely, so there was no need for anything crafty.

Lerxst