>>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.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)