Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Change Order of a set of data
Message
From
05/04/2002 09:09:26
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
05/04/2002 05:31:52
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00641277
Message ID:
00641383
Views:
17
>Never done it.
>
>If I were you I would add an Integer field
>
>Start numbering from a power of 2 (eg 2^10), and increment by it
>
>Insert = eg (1024 + 2048)/2
>
>index on bintoc() (Collating sequence = 'Machine')
>
>if the order is changed, update the underlying table, renumbering and incrementing by 2^10
>
>You may choose that the user changes the order by entering a value

Hi Gregory,
lets see if I understand (I try to repeat with my words)

First, the UI is simple up and down arrows [o.k. customer like drag'n'drop but he don't wan't to pay this ::)], user will not see the order criteria.

Initally I order like 1*(2^p),2*(2^p) .. n*(2^p)

A change of order will be somewhere between (n-1)(2^p) and n(2^p)
(at (n-1)(2^p)+(2^(p-1)?, but this will end up in p divisions ...)
After finish of ordering I update the table.

I don't understand ".... renumbering and incrementing by 2^10"
Do you mean renumbering the whole table to 1*(2^p),2*(2^p) .. n*(2^p)?

Why do you use "INDEX ON BINTOC(iOrder)"? Is there a difference (excepted space) to INDEX ON iOrder)

Agnes
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform