This project has moved. For the latest updates, please go here.

Removing all values of a multi-valued column

Sep 12, 2014 at 7:07 AM
From what I've understood from the documentation, to remove all the values of a multi valued column, I should use SetColumnGrbit.RevertToDefaultValue. But it's not clear to me how that flag should be used. What do I specify in ItagSequence?

In those situations, I turn to the test code for enlightenment, but it would appear that SetColumnGrbit.RevertToDefaultValue is never used in any test or sample. Is this an obsolete flag?

With that flag set, and ItagSequence == 1, I've managed to remove the first value of the multi-valued column. Don't tell me I have to remove each value one-by-one.
Developer
Sep 12, 2014 at 11:44 PM
I'm pretty sure that you need to remove each value one-by-one. But RevertToDefaultValue isn't used much. Try SetColumnGrbit.ZeroLength instead.

-martin
Sep 12, 2014 at 11:54 PM
I'm pretty sure I tried ZeroLength already, but I'll give it another shot tonight.

Darn. I was hoping to avoid that loop.
Oh well, thanks.
Developer
Sep 13, 2014 at 12:06 AM
Sorry, I'm wrong. ZeroLength will NOT delete the value. It will actually be set to null then.
If you continually delete itag 1, they'll all shift down by one.

-martin
Sep 13, 2014 at 12:16 AM
Yep. So I first have to RetrieveColumn to see how many values it has, and then call SetColumn that number of times (or do one SetColumns with that many ColumnValue). It just feels so inefficient. It's kind of like saying that to delete a string value, you need to write a 0x00 in each character position.