Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The old EOF() and REPLACE gotcha
Message
De
19/10/1999 09:25:55
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
The old EOF() and REPLACE gotcha
Divers
Thread ID:
00278126
Message ID:
00278126
Vues:
46
Hi All,

Went crazy with a REPLACE problem until I realized I was being bitten by an old problem. Thought I would post what was happening FYI:

Assume two tables, invheader and invdetail. invheader has 1 record and invdetail has none. The following statement won't work:

SELECT invdetail
REPLACE invheader.invno WITH "00001"

No replacement is made because the current alias, invdetail, is at EOF() (no records), even though invheader has a record and this is a valid statement. The following WILL work:

SELECT invheader
REPLACE invheader.invno WITH "00001"

Sometime this won't be as obvious as you won't have a SELECT statement to make the ALIAS() apparent.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform