Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Window 2000 - Using Copy To Array BUG ?
Message
From
04/07/1999 15:51:38
 
 
To
04/07/1999 14:09:24
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00237352
Message ID:
00237358
Views:
14
>I have a problem with Windows 2000 (profesional/advanced server) using the command COPY TO ARRAY (VFP 5.0a/VFP 6 no service pack 3). Presuming I have a table with 2 columns (id,name) and 6 rows usin COPY TO ARRAY myArray create a bi-dimesional array with 2 colums and 6 rows. After that I used COPY TO ARRAY myARRAY FOR recno()=4 the array myARRAY remain like a bi-dimensional array with 2 columns and 6 rows NO 1 and 1. The firs element was sostitute with the 4thh elemnt from table (like SCOPE FOR). The same thing if I make an append in tha table and then I used COPY TO ARRAY myArray. The array remain 6,2 NO 7,2.
>If used RELASE ALL LIKE myARRAY works well.
>Works well even SELECT-SQL INTO ARRAY.
>Is this a problem with Windows 2000 or is something else ?

Nope - COPY TO ARRAY doesn't extend arrays with new data, it'll overwrite existing data in the array at most. To extend an array with new data, redimension the old array to the necessary size, do a COPY TO ARRAY to a different intermediate array, and then use ACOPY to add the new elements to the existing, redimensioned array.

>Can anybody help me ?
>Thank You !
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
Reply
Map
View

Click here to load this message in the networking platform