Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Quiz
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Re: Quiz
Divers
Thread ID:
00082714
Message ID:
00082730
Vues:
34
>Things go like that when you SEEK DELETED()
>
>1. The DELETED() function is evaluated on the current record and it returns .T. or .F.
>2. The SEEK is executed with the previous value as argument. So, it will find the first deleted record if the current one is deleted or the first not-deleted record if the current one is not deleted. Ie: The first record that has the same "deleted" status as the currrent one.
>
>I saw this SEEK DELETED() command in many programs and it's tricky. This is why I included it in the quiz. Usually, this command will find the first not-deleted record (since most probably the current one is not deleted). Since this is usually used to reuse records, the program will write into a wrong record. This is a usual (but very difficult to find) bug.
>
>And you are right, the result depends also, obviously, on the SET DELETED setting. This is another reason you cannot choose one of first 4 answers.
>
>Is it more clear now?
>
>Vlad
>
Vlad,

Actually doesn't the record pointer stay in the same position unless SET DELETED ON was issued after the table was opened? If the status was ON when the table was opened then the record pointer is positioned at the first non-deleted record.

With the exception of SET DELETED ON, after the table was opened and the record selected being deleted, SEEK DELETED() won't move the record pointer at all. Therefore, "None of the above" is correct in this instance.

In the case of the above exception, the record pointer will go to EOF.

George
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform