PC SOFT

GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEVWEBDEV e WINDEV Mobile

Inicio → WINDEV 2024 → substituting CLEUNIKs in child records
substituting CLEUNIKs in child records
Iniciado por pi, jun., 19 2001 4:06 PM - 4 respostas
Publicado em junho, 19 2001 - 4:06 PM
Are there any good reasons why one should not change a child record's
parent by substituting CLEUNIKs that exist already?
Publicado em junho, 20 2001 - 10:49 AM
Hi Brian.

Answer: NO

I copy over keys as necessary as false IDs to have the 'wrong' file
bring up its adopted children.

Gill

Brian Pottorff wrote:

Are there any good reasons why one should not change a child record's
parent by substituting CLEUNIKs that exist already?
Publicado em junho, 20 2001 - 11:46 AM
Hi, GP:
I'm not in need of this strategy at the moment - but it makes sense to
me as an option. I used to do this with binary trees in C in the old
days. Substituting pointers made it easy to move whole subtrees with one
line of code.

In Windev, so long as one is only substituting keys that already exist
and not making up new ones that could conflict with the automatic key
assignment of the language, why not?
Publicado em junho, 20 2001 - 3:59 PM
No Brian,

that doesnt make any sense. Either you have to rethink your concept or to
use ordinary long integers as a key. The cleuniks make a lot of sense in
regards to .. f.i.
customer wants to change the customer number at any time, but the cust# is
in a lot of records. Use a cleunik for customer records instead and just
"show" the customer number. Now they can change their customer numbers as
often as they want, they´ll be unable to disturb the program.



"Brian Pottorff" <pi@zianet.com> schrieb im Newsbeitrag
news:3b2fcc4e@news....
Are there any good reasons why one should not change a child record's
parent by substituting CLEUNIKs that exist already?
Publicado em junho, 20 2001 - 8:53 PM
You´re right (last paragraph). To avoid any unwanted interference with the
automatic key generation for the cleunik, just create your own long int key.
Just a thought.
Günter Predl (Sorry, didnt know about the "GP" before posting and cant
change it now)

"Brian Pottorff" <pi@zianet.com> schrieb im Newsbeitrag
news:3B30C557.A9C21C24@zianet.com...
Hi, GP:
I'm not in need of this strategy at the moment - but it makes sense to
me as an option. I used to do this with binary trees in C in the old
days. Substituting pointers made it easy to move whole subtrees with one
line of code.

In Windev, so long as one is only substituting keys that already exist
and not making up new ones that could conflict with the automatic key
assignment of the language, why not?