[wix-users] Difference's accessing record in DTF

Lucas Lacroix lcharron at meditech.com
Tue Jul 11 17:01:53 PDT 2017


What is the error you get?

On Tue, Jul 11, 2017, 19:19 Joseph L. Casale <jcasale at activenetwerx.com>
wrote:

> Given the code below:
>
> using (Database database = session.Database)
> using (View view = database.OpenView("SELECT * FROM IIsWebAddress"))
> {
>     view.Execute();
>
>     // Fails.
>     Record[] records = view.ToArray();
>     view.Modify(ViewModifyMode.Delete, records[0]);
>
>     // Works.
>     foreach (Record record in view)
>     {
>         view.Modify(ViewModifyMode.Delete, record);
>     }
> }
>
> You can successfully delete records by iterating the view, but if you
> attempt to index a collection of the resulting records and remove
> one, it throws?
>
> What is the rationale for this behavior?
>
> Thanks,
> jlc
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>
-- 
Lucas Lacroix
Computer Scientist
Advanced Technology Division, MEDITECH <http://ehr.meditech.com/>
781-774-2293



More information about the wix-users mailing list