Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to store a lot of text in a field in an SDE registered business table (an ITable, not a featureclass) - let's say 10,000 words roughly. I am using Oracle 10g and ArcSDE 9.1.

I am programming with ArcObjects 9.2 sp6.

It looks like the only option might be to use a BLOB as a CLOB is not usable with 9.1 (shame).
Can you use a BLOB in this way and how would you do it in ArcObjects code?

share|improve this question
Is that 10,000 words per record? Why not as Raw? do you need it really to be ESRI object? or can you use a reference table that is just native DB. – D.E.Wright Aug 24 '11 at 21:03
Could you a reference table - but that would be a bit annoying and generate more code. It has to be an ESRI object as I need to return an ObjectID when I insert a record. It would be 10,000 words per record too. – Vidar Aug 24 '11 at 21:09

Yes, you can use either a Blob or LONG_RAW per the docs edndocs to support a huge block of text, you really want to make sure you parse your text well before it goes in so you don't have any compromised information in the string.

You will have to handle the storing yourself; since its looking like that assumes you are inserting something binary.

share|improve this answer
Do you know how you go about storing? Is it something to do with IMemoryBlobStream? – Vidar Aug 24 '11 at 21:28
up vote 2 down vote accepted

I think I have some kind of solution - but not sure if it's that elegant, but nothing else jumps out.

Does this look right to you?, your feedback is welcome.

StrArray strArray = new StrArrayClass();
strArray.Add("This is a load of mumbo jumbo that goes on for ages...");
IPersistStream persistStream = (IPersistStream)strArray;
IMemoryBlobStream2 memoryBlobStream = new MemoryBlobStreamClass();
persistStream.Save(memoryBlobStream, 0);
rowBuffer.set_Value(fooIndex, (System.Object)memoryBlobStream);
share|improve this answer
It is more common practice to store propertysets in blobs, but then again I've never used it with such large objects. If you port this to 10, I've seen a bug with deserializing. You also might need to deal with flushing if you're using an insert cursor. I think it flushes every 500 inserts by default. – Kirk Kuykendall Aug 24 '11 at 22:33
Cheers for that Kirk - I'll bear that one in mind. – Vidar Aug 25 '11 at 9:12
Actually, this is the way to do it. @Kirk: are you worried he will run out of memory before the cursor flushes (a valid concern). You can force the flushing using the Flush method on the cursor Object. Don't do it too often, since you loose optimizations that you get by bunching your inserts and updates together. – Ragi Yaser Burhum Oct 19 '11 at 18:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.