Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copying a record
Message
From
05/09/2000 18:21:41
 
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00412653
Message ID:
00412669
Views:
15
>>Anyone know the fastest, easiest, cleanest way to copy a record. The only thing I don't want copied is the cID field that gets updated with newid(). Everything else needs copying.
>>
>>BTW --- APPEND FROM ARRAY doesn't update cID
>>
>>
>>Thanks 4 your help.
>
>In general you can use:
>scatter memvar memo
>m.cID=newID()
>append blank
>gather memvar memo


Rather than using SCATTER/GATHER MEMVAR, I've found it far better to use SCATTER/GATHER NAME, which creates an object:

SCATTER NAME oTemp MEMO
oTemp.cID = newID()
APPEND BLANK
GATHER NAME oTemp MEMO

If the table automatically assigns a default value on adding a new record, this should read:

SCATTER NAME oTemp MEMO
APPEND BLANK && default ID assigned on APPEND
oTemp.cID = cID
GATHER NAME oTemp MEMO
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform