Highest LT_VALUE_SORT_INDEX in a simple lookup table?

T

tfz

Hello,

I am adding values to a simple lookup table using the PSI (version 2007).
The table is set to "sort ascending". I have roughly 1200 enteries, and when
I try to add any more, I get a GeneralUnhandledException.

It's just a big, simple list with pretty unremarkable text data, and I'm
looping through my data adding each entry, but my import keeps bombing out
somewhere around 1200 entries. The only thing strange that I notice is that
the LT_VALUE_SORT_INDEX of the last entry is 997622.8209191759 (at least it
was on my latest attempt). Since I am adding the entries in order, any that
I add would have a higher sort order, and thus send that number over the
1,000,000 mark. Could this be causing my problem? Has anyone run into
something similar?

Thanks for your always-helpful insight!
 
K

Kit

I ran into the same error. I'm guessing that you're reading the table and
then calling update. Use the GetChanges() function to return on the changes
that you have made the table before calling UpdateLookupTablesMultiLang.

LookupTable _lookupTable;
LookupTableMultiLangDataSet _ltMultiDs;

.....

bool validateOnly = false;
bool autoCheckIn = false;
_ltMultiDs = _ltMultiDs.GetChanges() as LookupTableMultiLangDataSet;
_lookupTable.UpdateLookupTablesMultiLang(_ltMultiDs, validateOnly,
autoCheckIn);
_ltMultiDs.AcceptChanges();
 
T

tfz

Thanks for the tip.

I ended up inserting the items in random order rather than in alphabetical
order. That seemed to work. (My guess is that it did a better job of
recalculating the sort order index when adding entries to the middle of the
list rather than adding all of the entries to the end of the list.)

Thanks,
tfz
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top