Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update cursor from array
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01670075
Message ID:
01670081
Vues:
48
>>>>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:
>>>>
>>>
>>>VFP has the hybrid INSERT INTO ... FROM ARRAY.
>>>
>>>Tamar
>>
>>Thank you. But in my case the cursor already exist. So, I am not sure that the INSERT INTO will work.
>
>
>CREATE CURSOR .....
>INSERT INTO ... FROM ARRAY
>INDEX ON ...
>
>SELECT SOURCE
>SET RELATION TO... INTO CURSOR
>REPLACE F1 WITH CURSOR.F1  ALL
>
>
>
>MartinaJ

Thank you, again. Your approach of using SET RELATION works very well.
Actually I don't even need to convert the array to cursor. Because the calling procedure was converting a cursor to an array (in order for me to pass the array). Now I will be updating the TARGET (you call it SOURCE ) cursor directly from the SOURCE cursor (that I was converting to the array).
I am sure my message is very confusing to all except to me :)
"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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform