Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is faster: insert from memvar or insert fields?
Message
 
 
À
24/07/2006 20:41:50
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01139366
Message ID:
01139531
Vues:
17
>I've had a few pieces of code where I (the framework I inherited, actually) used scatter/gather memvar a lot. The trouble with that approach is when you don't do all the fields, and there's a variable (from previously executed code) whose name matches a field. It will be GATHERed (or inserted) and you wouldn't notice. The reliability of this approach decreases exponentially with the number of lines between Scatter and Gather/Insert :).
>
>It gets even worse if you're inserting into more than one table. You need to control all the variables, and still there's a chance a new field in one of target tables may pop up, with a name same as one of the variables. So some field may get a value you didn't intend to - and catching this type of error is time consuming.
>
>I'm for the insert ... values or insert ... name simply because you have more control over what's being written.

That's also a good point.

I guess you know a joke about Jewish judge <g>

Now I have both of you right. I guess I'll keep what I have now. Hopefully new ValidateSSN and age calculation makes some difference. Otherwise I'm going to reveal other pieces of this misery...
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform