Current filter:
                                You should refresh the page.
                                0
                                  • Hi. Just upgraded to scheduler3 to make use of the AggregateStorage component.
                                    I seem to be having a bit of trouble with custom fields. When I define custom fields I end up with an "ItemIndex out of range" exception.

                                    I'm aggregating several DBStorage components and need to have custom fields called "EntryID" and "SynchOutlook" on one of them.
                                    I've written code to add these fields to each DBStorage component and also to the AggregateStorage component.

                                    The code for a DBStorage is

                                        Field := AStorage.CustomFields.Add;
                                        Field.FieldName := 'EntryID';
                                        Field := AStorage.CustomFields.Add;
                                        Field.FieldName := 'SynchOutlook'

                                    and for the AggregateStorage it is

                                      Field := Storage.CustomFields.Add;
                                      Field.Name := 'EntryID';
                                      Field := Storage.CustomFields.Add;
                                      Field.Name := 'SynchOutlook';

                                    Am I missing something? Could you provide a code sample?

                                    thanks

                                    Jo

                                0

                                Hi Jolyon,

                                We are sorry that you encountered this problem. We reproduced the described exception, if any of the following conditions are met:
                                1.Custom fields are added to an aggregate storage before adding custom fields to linked storages.
                                2.The number of custom fields differs in an aggregate storage and linked storages.

                                To overcome the problem, make sure that:
                                - Custom fields are created first in linked storages, and then in an aggregate storage. Also, we recommend that you enclose the code adding custom fields into an aggregate storage in BeginUpdate/EndUpdate method calls.
                                - The CustomFields collections contain the same number of custom fields before new fields are added.

                                Due to these finding, we've converted this question to a bug report. Our developers are already searching for a solution to this issue. Please stay tuned for updates.

                                Thanks,
                                Alex

                                0

                                Thanks Alex. Your workaround has solved the problem.

                                You must  log in  or  register  to leave an answer

                                Is your intention to post an answer to your own question?

                                • If so, then proceed.
                                • If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
                                • If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.