Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I append without opening the edit window?
Message
De
28/06/2001 11:08:32
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
28/06/2001 10:41:09
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00524283
Message ID:
00524715
Vues:
13
>>>Better yet, use the NAME clause. Adapting the example above:
>>>
>>>
>>>select mytable
>>>scatter memvar memo name loRecord
>>>loRecord.MyField1 = <some specific value>
>>>...
>>>append blank
>>>* if a PK is assigned automatically (default value) when inserting a record:
>>>loRecord.MyPK = MyPk
>>>*
>>>gather name loRecord
>>>
>>
>>Hilmar,
>>While there are numerous ways to do this I simply couldn't get why this is 'better'. Translating yours :
>>
>>select mytable
>>scatter memvar memo
>>m.MyField1 =
>>...
>>* if a PK is assigned automatically (default value) when inserting a record:
>>m.MyPK = MyPk
>>insert into myTable from memvar
>>
>>Now why using name is better ? Just it's more OOP or anything else ?
>>Cetin
>
>Well, I think it is better to manage a single variable (loRecord). For instance, you only have to use a single LOCAL declaration:
>
>
>local loRecord
>scatter name loRecord
>
>
>This would be quite difficult if you use one variable for each field.
>
>Hilmar.

How difficult ? Why would I need the local declaration ? You mean it's sufficient to declare a memvar to make it available after method/event routine ends ??? If so how ?

scatter memvar memo

It's this simple since fox2.x (not seen fox1x).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform