Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sometimes deletes and sometimes does not
Message
From
07/10/2004 09:00:05
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
07/10/2004 04:22:43
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00949061
Message ID:
00949496
Views:
17
>hi ,
>
>i try as under, i get error message(end of file encountered).

Then, perhaps it is time for some debugging. "End of file encountered" seems to indicate that you are at the end of file (that is, AFTER the last record), when you expect to have a valid record selected.

Use the debugger to see:

1) If this really is the case. You can put the command SET STEP ON just before the command that gives you problems. You can also set a breakpoint in the debugger windows; that is less permanent (no need to delete the SET STEP ON statement later).

2) What commands give you the unexpected condition. This would require a SET STEP ON, or a breakpoint, earlier in the program.

>
>>CLOSE all
>>SET TALK OFF
>>SET ECHO OFF
>>SET SAFETY OFF
>>    thisform.text3.SetFocus
>>     USE homecomm1 excl
>>     zap
>>  SELECT 0
>>    USE newcomm66 EXCL
>>    SET DELETED on
>>    INDEX ON VAL(char2) TO hh
>>
>>     set order to "hh"
>>     lnTotalCopied = 0
>>     FOR i = 1 TO (thisform.text3.Value)  && assume 20 values for flag
>>     lnTotalNeedingCopy = (thisform.text3.Value * i) - lnTotalCopied
>>   SEEK i
>>   COPY TO temp2 NEXT (lnTotalNeedingCopy) WHILE VAL(char2) = i
>>   lnTotalCopied = lnTotalCopied + _Tally
>>   SEEK i
>>   DELETE NEXT (lnTotalNeedingCopy) WHILE VAL(char2) = i
>>   SELECT homecomm1
>>   APPEND FROM temp2
>>   SELECT newcomm66
>> NEXT
>>   delete&&the proplem
>   delete
>    skip
>  if eof()
>    go bottom
>    endif
>ThisForm.Refresh()
>
>> thisform.text3.SetFocus
>>
>>CLOSE ALL
>>use homecomm1 excl
>>BROWSE
>>
>>
>
>
>
>thanks.
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
Next
Reply
Map
View

Click here to load this message in the networking platform