Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem indexing table-buffered cursor
Message
From
25/03/2007 05:55:30
 
 
To
24/03/2007 18:39:40
Alan Harris-Reid
Baseline Data Services
Devon, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01208219
Message ID:
01208277
Views:
21
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform