Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
COPY TO ARRAY against a cursor?
Message
De
01/08/2019 19:22:16
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
COPY TO ARRAY against a cursor?
Divers
Thread ID:
01669872
Message ID:
01669872
Vues:
105
All,

I'm seeing issues with COPY TO ARRAY. The following illustrates it on my machine today:
create cursor ffff (g_ggx c(1))
insert into ffff values ("A")
insert into ffff values ("B")
insert into ffff values ("C")
insert into ffff values ("D")
insert into ffff values ("E")
declare laTest(50,1)
laTest=""
COPY TO  laTest FIELDS g_ggx
SET STEP ON
Looking at laTest content in Debug, first 5 rows ought to be populated with field content- but nix. HELP refers to Tables as source for COPY TO ARRAY and there's no mention of Cursors, but SCATTER to ARRAY from a cursor works beautifully and I'd expected COPY TO would too.

Issue is that I want that array size to be maintained with blank rows for the surplus. The other option is SELECT into ARRAY, but Tamar's paper calls that an order of magnitude slower for a small resultset and it also truncates the array- which breaks the intended model.

Any advice appreciated! I've experimented with NOOPTIMIZE and FOR .T. as well as large cursors that ought to spool to disk (in case it's the memory-residency that's the cause) but it reproducibly refuses to populate the array from a cursor....
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us.
"
-- Shakespeare: Coriolanus, Act 1, scene 1
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform