Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem indexing table-buffered cursor
Message
From
25/03/2007 15:06:46
 
 
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:
01208317
Views:
22
>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


It is somewhat strange situation you are having here.

Buffering and indexing don't go very well together.
Buffering is tightly associated with shared data access, while
indexing/reindexing is kind of operation done at design time and then
once in a blue moon (when/if you face corruption) and requires EXCLUSIVE access.
So if you have exclusive access, why you need buffering?
If you don't then you simply cannot do it; next to error u r getting now, next one will read 'Table must be open exclusively'

update:
Cannot be done on views eighter because they are at the end just a
cursors which means dbfs


Can u pls explain what exactly you are trying to do/achieve with this?
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform