Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Do_while?
Message
 
 
À
14/06/2004 06:34:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00912788
Message ID:
00913566
Vues:
15
Hi Tamás,

From help on INSERT
Appends a new record to the end of a table that contains the specified field values. I think that the current record stays the same.

APPEND BLANK appends a record to the end of a table, makes it the current record and locks it. SKIP after APPEND BLANK puts you past(?) EOF().

RECNO() returns the current record only if the table isn't buffered. Otherwise it returns a negative value until TABLEUPDATE() is performed.

>Thanks for your answer but if the INSERT sould do what you said, then in the following example the "SKIP" should make every second record leave out.
>
>Create Cursor temp (int1 i, num1 n(4,0))
>DO WHILE recno() < 10
> Insert Into temp (int1, num1) Values (RECNO(),RecNo()*10)
> SKIP
>ENDDO
>
>It is because when the recno() is evaluated first and the INSERT fills the first record and moves the record pointer to the next one, the SKIP should moves the record pointer to the following record so the actual record pointer is now on the the third record. Am I thinking right?
>
>Thanks,
>Tamás Szigeti
Regards,

Mike

"We try to solve the problem by rushing through the design process so that enough time is left at the end to uncover the errors that were made because we rushed through the design process."
- Glenford Myers

If you're going through hell, keep going. - Walt Disney
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform