Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SCATTER NAME Problem
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
SCATTER NAME Problem
Miscellaneous
Thread ID:
00734564
Message ID:
00734564
Views:
45
I want to SCATTER a record from one table, add some
fields to the record object, then GATHER into another table.

Both tables have the same structure, with the exception of 4 extra
fields on table 2.

To accomplish this, I SELECT out the record, plus the extra fields, then
SCATTER to the record object. Is there a different way to do this?
SELECT Table1
nRec = RECNO()

SELECT *, DATETIME() AS Field1, SPACE(11) AS Field1,;
       SPACE(1) AS Field3, SPACE(2) AS Field4;
  FROM Table1;
  WHERE RECNO() = nRec;
  INTO CURSOR Temp1

SCATTER NAME oRecord MEMO

oRecord.Field1 = DATETIME()
oRecord.Field2 = "Some Value"
oRecord.Field3 = "A"
oRecord.Field4 = "01"

SELECT Table2 APPEND BLANK
GATHER NAME oRecord MEMO
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Next
Reply
Map
View

Click here to load this message in the networking platform