Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Small adjustment needed on recycle approach
Message
 
À
07/05/2003 00:42:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00785663
Message ID:
00785863
Vues:
20
I wish there was a good way. Pre-padding is one way, but, I think you still need exclusive access. Here's an example of using a memo without growing it:
CREATE TABLE c:\temp\test (Mem M)
APPEND BLANK
REPLACE Mem WITH SPACE(100000)  && pre-allocate
FOR i = 1 TO 1000
  REPLACE Mem WITH STUFF( Mem,  1+ 100 * (i-1), 100, PADR( REPLICATE( TRANSFORM( i), 100), 100))
ENDFOR
USE
>I need a small adjustment in this recycle approach. Basically, it recycles. It's just that the memo file keeps increasing. I can't seem to find what I'm missing here.
>
>
>IF NOT tlRecycle
>   INSERT INTO (ALIAS()) (Numero) VALUES (GetNumero(ALIAS()))
>   ELSE
>   SET DELETED OFF
>   LOCATE FOR DELETED()
>   SET DELETED ON
>   llFound=FOUND()
>   IF llFound
>      RECALL
>      BLANK
>      REPLACE Numero WITH GetNumero(ALIAS())
>      ELSE
>      INSERT INTO (ALIAS()) (Numero) VALUES (GetNumero(ALIAS()))
>   ENDIF
>ENDIF
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform