Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem indexing table-buffered cursor
Message
De
25/03/2007 05:55:30
 
 
À
24/03/2007 18:39:40
Alan Harris-Reid
Baseline Data Services
Devon, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01208219
Message ID:
01208277
Vues:
20
>I wish to index a table-buffered cursor as follows...
>
>SELECT MyCursor
>lnOrigBuffering = CURSORGETPROP('Buffering')
>
>IF GETNEXTMODIFIED(0)=0            && check no uncommitted changes
>   =CURSORSETPROP('Buffering',3)   && cursor must be row-buffered for indexing
>	
>   INDEX ON myField TAG myTag
>ENDIF
>
>=CURSORSETPROP('Buffering', lnOrigBuffering)   && restore original buffering
>
>
>Upon issuing CURSORGETPROP() I get the error message "Table buffer for alias MyCursor has uncommitted changes", but I thought I had already tested for no uncommitted changes using GETNEXTMODIFIED first.
>
>Can anyone tell me where I may have gone wrong?
>
>TIA,
>Alan
>
>
>PS. sorry about the double 'buffered' in the title - too trigger-happy with the keyboard and cannot edit the title once posted!

Do you use SETFLDSTAT() ?
SELECT MyCursor

IF GETNEXTMODIFIED(0)=0 AND TABLEREVERT(.T.)   && check no uncommitted changes
   lnOrigBuffering = CURSORGETPROP('Buffering')

   =CURSORSETPROP('Buffering',3)   && cursor must be row-buffered for indexing

   INDEX ON myField TAG myTag
   =CURSORSETPROP('Buffering', lnOrigBuffering)   && restore original buffering
ENDIF
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform