Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy cursor to another new cursor for update the first o
Message
From
22/06/2011 02:38:45
 
 
To
20/06/2011 18:12:59
Luis Santos
Biglevel-Soluções Informáticas, Lda
Portugal
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01515215
Message ID:
01515438
Views:
66
Hi Luis,

based on your infos there is no need to create a new cursor, change this new one and make it the new base cursor.

To me it seems, that your problem already appears in the base cursor because that one is readonly.

You should check where your base cursor is created and take care ( might be via adding READWRITE at the end of the select statement) that it is updateable.

As soon as your cursor can be updated, and you want to change all records to one identical value, all you'd have to do would be a global REPLACE.

REPLACE ALL vencido WITH [Vencido] IN myCurs

>Hello comunity
>
>i need the correct syntax to copy my current cursor to another new one for changing some values and after that i wnat to replace the primary cursor values with the new ones.
>Exemple:
>my current cursor name is tempccf and i have one column value call vencido (varchar), the value in there is "Vencido !?", i want to create a new cursor named Mycurs like this:
>1.copy the structure of tempccf
>2.copy all the values of tempccf to my new cursor Mycurs
>3.update Mycurs.vencido with 'Vencido'
>4.replace all the records of my tempccf cursor with all the records of my new cursor Mycurs.
>
>I put just a simple field column, because if i understand the correct way to do that , i can change all kind of values.
>
>Note : if i type
>select tempccf
>brow
>
>I see all the records on my original cursor.
>
>Anyone could help me, because i try some coding , like:
>select tempccf
>copy stru to mycrs
>use mycrs
>append blan
>brow
>
>i VFP give me an error "File is in use" line 3.
>
>Best regards,
>Luis Santos
Best Regards
-Tom

Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.

Oh, and BTW: 010101100100011001010000011110000101001001101111011000110110101101110011
Previous
Reply
Map
View

Click here to load this message in the networking platform