FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Maybe OT: OrdCreate with Unique Clausule
Posts: 30
Joined: Sun Apr 24, 2011 12:50 AM
Maybe OT: OrdCreate with Unique Clausule
Posted: Thu Apr 28, 2016 12:09 AM

Hi all

Any one has used OrdCreate( ... ) with the UNIQUE clausule and work as expected ?

Help say: OrdCreate(<cOrderBagName>,[<cOrderName>],<cExpKey>, <bExpKey>, [<lUnique>])

But when use with lUnique .T. nothing happens

Sorry if is Off Topic

Regards

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Maybe OT: OrdCreate with Unique Clausule
Posted: Thu Apr 28, 2016 12:27 AM

I used unique indexes and they work the way they are expected to work.
I use command syntax

INDEX ON <expr> TAG <tagname> UNIQUE

Regards



G. N. Rao.

Hyderabad, India
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Maybe OT: OrdCreate with Unique Clausule
Posted: Thu Apr 28, 2016 08:02 AM
hidroxid,

I'm using it in some complicated situations

a sample

The index :

cUnique := cRMonat + "P" // cRmonat can be January - Dezember 12 different DBF

ORDCREATE( ,cUnique, "UPPER(PAT_NNAME + PAT_VNAME)", ;
{|| UPPER(PAT_NNAME + PAT_VNAME) } , .T. )
// .T. = UNIQUE

ORDCREATE( ,cRMonat, "UPPER(PAT_NNAME + PAT_VNAME)", ;
{|| UPPER(PAT_NNAME + PAT_VNAME) } , .F. )


It is the same DBF but opend twice. Once with a UNIQUE on NAMES
and the 2. with a normal index on NAMES

The result :

The left browser-sample -> NO unique
The right browser-sample -> UNIQUE

The upper browser UNIQUE is needed
The lower browser is related to brower 1



I hoüpe it helps

regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 30
Joined: Sun Apr 24, 2011 12:50 AM
Re: Maybe OT: OrdCreate with Unique Clausule
Posted: Thu Apr 28, 2016 11:54 AM

I have to check my source carefully because in an example that would send to your..... it worked :shock: , then the problem is not the function the problem is me lol :D

Thanks so much!

Continue the discussion