Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to do a cursor writable?..
Message
De
24/03/2006 17:39:20
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01107530
Message ID:
01107537
Vues:
18
>>Hi, I have these command lines:
>>
>>Select * from Mytable into cursor MyCursor
>>
>>* Then :
>>
>>Select MyCursor
>>Scan
>> If field1=1
>> replace field2 with date()
>> Endif
>>Endscan
>>
>>How to write into MyCursor? VFP tell me: Can´t write in the cursor..
>>The question is: how to do it writable?..
>>
>>Thanks in advance
>>Carlos Burgos
>
>Select has a clause readwrite or nofilter, but I can not remember in what version were they added, so, if they do not work for you, you can try after de select:
>
>
>use dbf('myCursor') again alias myWritableCursor in 0
>use in select('myCursor')
>
>select myWritableCursor
>scan
>...
>endscan
>
A word of warning about this.

VFP 6 does not support READWRITE, so Hugo's statements are what you need to do. BUT VFP 6 does support NOFILTER. If you don't use that clause, you could wind up having a filtered view to the main table and when you open the cursor again you are really opening the underlying table again WITHOUT THE FILTER. You could easily be updating records you never intended to touch.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform