Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Am I misusing TableUpdate()?
Message
De
15/09/1999 23:37:42
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00261437
Message ID:
00265335
Vues:
58
>>Lame. I always assumed that it was only using the field states. I have been able to fool TABLEUPDATE before, telling it which fields to set, but have never tried this exact scenario.
>
>I would love to hear the situations where your "fakeout" was successful.
>

It had nothing to do with new vs existing records, that was the key difference.

>>If not, then you will need to build an update routine like you were talking about, and try to emulate what VFP does internally, but match which records don't exist to decide when to use an INSERT.
>
>
>One last time to help the next person (maybe someone will take the crown for Densest VFPer, but right now I am the king <grin>).

Actually, there are a lot of people on the list miles ahead of you.

>Here's my workaround code. This works. Is there a way to make it tighter?
>


Looks good to me. If the structur of this table is not carved in stone though, this routine will be a pain to maintain. Every time you add a field, you will have to update the routine. The only way around this is with some fancy code that builds the UPDATE statement dynamically from AFIELDS. But if this is not a concern, then your routine is fine.
Erik Moore
Clientelligence
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform