Re: Deleting rows in a DataView
- From: "Scott M." <s-mar@xxxxxxxxxxxxx>
- Date: Thu, 20 Oct 2005 22:19:55 -0400
Better make that:
Do While dview.Count > 0
dview.Delete(0)
Loop
"JohnGriffiths" <Reply@xxxxxxxxxxxxxxx> wrote in message
news:dj8tfi$irm$1@xxxxxxxxxxxxxxxxxxxxxxx
> Not an expert but I would expect something like
>
> Do While dview.Count > 0
> dview.Delete(1)
> Loop
>
> Regards John
>
> Or
>
> Set dview = Nothing
>
> :-)
>
>
> "Geoff" <nodamnspam@xxxxxxxxx> wrote in message
> news:VLidnQzwbZn_cMreRVnytQ@xxxxxxxxxxxx
>> Hi
>>
>> I'm hoping somebody can help me with the following.
>>
>> I'm trying to delete all the rows in a dataview. There are 200 rows.
>> Everything works fine until I delete half way through and then I'm told
>> in
>> an exception that
>>
>> "There is no row at position 100"
>>
>> The code I'm using is:
>>
>> For Each i As Integer In MyList
>> dview.Delete(i)
>> Next
>>
>> where MyList holds the numbers 0 to 199
>>
>> There are 200 rows in the dataview (I can see them in a datagrid).
>>
>> Can anybody tell me what I'm doing wrong?
>>
>> Geoff
>>
>>
>
>
.
- References:
- Q: Deleting rows in a DataView
- From: Geoff
- Q: Deleting rows in a DataView
- Prev by Date: Re: Killing VB softly with his song, Killing VB softly...with a song.............
- Next by Date: Re: Can you recommend a book?
- Previous by thread: Q: Deleting rows in a DataView
- Next by thread: Re: Deleting rows in a DataView
- Index(es):
Relevant Pages
|