Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deleted record No. returned even with set deleted on
Message
From
27/01/2010 08:55:40
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01446068
Message ID:
01446141
Views:
45
>I am getting a deleted record no. returned even with Set Deleted On..why is this.
>The following will replicate it
>1. Set up a Table with 3 records in it
> Delete the First and third record
> From the command window:
> Sele 0
> Use MyTable Alias 'MY'
> Sele MY
> Wait window recno() This shows 2...which is as expected
>
>2. Create a new form
> Insert the Table --> MyTable into the Data Environment with an alias of 'MY'
> On A Button Click have the following:
> Set deleted on
> Select MY
> Wait Window Recno() This Shows 1.... landed on the deleted record ???
>
>If I code around this , by putting a Goto Top , its ok, but why is it (From the DE) landing on the
> deleted record. Mind you, if I click the button a second time, its ok.
>But first time round it is wrong, and different to what happens in the command window
>
>Maybe there is something I can put into the DE to prevent it going to the deleted record ?
>
>Puzzling ?
>Gerard

In part (2), after selecting the table, the deleted record was still selected. After issuing SET DELETED (also, after issuing a SET FILTER), you must do something like GO TOP or SKIP to move the record pointer.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform