Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sorting/Indexing a Buffered Cursor
Message
 
To
28/01/2006 15:56:40
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01091159
Message ID:
01091206
Views:
11
>>Hi!
>>
>>I have a grid class which allows users to sort any column (asc or desc) by clicking on it. Internally it creates an index on the fly and handles row/table buffering etc.
>>
>>All this works fine but how do I handle sorting/indexing columns in a table buffered cursor with modified rows (uncommitted changes)?
>>
>>The users do not want to save the changes first but add, change data, sort on different columns, have a look at the data and then decide if they want to save the changes or not.
>>
>>I would prefer not to create an index on every column in the table as there are many columns.
>>
>>Sarosh
>
>this is a dynamic column index with table buffer support,
>the only issue is the public variable
>
>CREATE CURSOR dynindex (f1 i,f2 i)
>FOR k=1 TO 100
> INSERT INTO dynindex VALUES (RAND()*10000,RAND()*10000)
>NEXT
>g_indexexp = ".T."
>INDEX ON EVAL(m.g_indexexp) TAG TCOLUMN
>CURSORSETPROP("Buffering",5)
>BROWSE NORMAL
>g_indexexp = FIELD(1)
>REINDEX
>BROWSE NORMAL
>g_indexexp = FIELD(2)
>REINDEX
>BROWSE NORMAL
>
Fabio, I just tryed this and on REINDEX I get an error message:
"Command cannot be issued on a Table with Cursors in Table Buffering mode". Just change some values when first browse appears.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform