Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update cursor from array
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Update cursor from array
Divers
Thread ID:
01670075
Message ID:
01670075
Vues:
86
Hi,

I need to update a cursor based on the values in an array. I know I can do it by scanning through the cursor or scanning through the array and checking each element. But I was wondering if there is SQL command to do it. The following are the structure and sample of the cursor and the array:
*-- cursor
*-- strucutre
column        value
*-- record 1
PK                333
WEEK_NO    12
WEEK_FR      1
WEEK_TO     52
*-- record 2
PK                4
WEEK_NO    45
WEEK_FR      2
WEEK_TO     23
*-- and so on

*-- array
local array aSchedule[2,4]
*-- element 1
aSchedule[1,1]  = 333   && corresponding to the column PK in the cursor
aSchedule[1,2]  = 3       && corresponding to the column WEEK_NO in the cursor
aSchedule[1,3]  = 1       && corresponding to the column WEEK_FR in the cursor
aSchedule[1,4]  = 45       && corresponding to the column WEEK_TO in the cursor
*-- element 2
aSchedule[1,1]  = 4        && corresponding to the column PK in the cursor
aSchedule[1,2]  = 3       && corresponding to the column WEEK_NO in the cursor
aSchedule[1,3]  = 1       && corresponding to the column WEEK_FR in the cursor
aSchedule[1,4]  = 45      && corresponding to the column WEEK_TO in the cursor
TIA
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform