Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
COPY TO Behavior
Message
From
09/01/2002 12:29:40
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00602562
Message ID:
00602581
Views:
20
Hey Kevin,

I would prefer a select statement, but to see if I could get an answer I took a quick look at Hacker's guide...

According to the book, you must dimension the array as two-dimensional before the COPY TO command. If not, the command only operates on one record.

Example:
USE Employee
DIMENSION aCity[RECCOUNT(), 1]
COPY TO ARRAY aCity FIELDS City
Perhaps you already had the array inside of VFP environment, but not in runtime.

>In the command window, COPY TO fills an array with ALL records
>from the table, which is what I want:
>
>COPY TO ARRAY aTemp FIELDS UserId, First, Last, GroupId
>
>
>In runtime, I get only the FIRST FIELD on the FIRST RECORD!!!!
>
>What gives?
Steve Gibson
Previous
Reply
Map
View

Click here to load this message in the networking platform