Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Records are slipping through the cracks...
Message
De
02/10/2000 14:13:07
 
 
À
02/10/2000 13:48:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00423580
Message ID:
00423590
Vues:
18
>
>Here's my code:
>
>
>----------------------------------------------
>USE J:\DATA\ORDLOG
>GO BOTT
>lDone = .F.
>DO WHILE ! lDone
>    ? RECNO(),compname
>    SKIP
>    IF EOF()
>        nReccount = RECCOUNT()
>        GO BOTT
>        nCount = 0
>        lBailOut = .F.
>        DO WHILE nReccount = RECCOUNT() AND ! lBailOut
>            nCount = nCount + 1
>            WAIT WINDOW "IDLE... " + ALLTRIM( STR( nCount ) ) NOWAIT NOCLEAR
>            DOEVENTS
>            INKEY(1)
>            IF LASTKEY() = 27
>                lBailOut = .T.
>            ENDIF
>        ENDDO
>        SELECT ORDLOG
>        SKIP
>    ENDIF
>    IF LASTKEY() = 27
>        lDone = .T.
>    ENDIF
>ENDDO
>
Larry,

You have a skip at the top of the DO WHILE ! lDone loop, and another skip near the bottom of the same loop. If 2 records are added at almost the same time, it appears one of them will be skipped.

However, you should be following Trey's advice here...this should be done in a trigger or in your business logic where the records are being added.

HTH,
Steve Gibson
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform