Maybe OT: OrdCreate with Unique Clausule

Post Reply
hidroxid
Posts: 28
Joined: Sun Apr 24, 2011 12:50 am

Maybe OT: OrdCreate with Unique Clausule

Post by hidroxid »

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
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Maybe OT: OrdCreate with Unique Clausule

Post by nageswaragunupudi »

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
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: Maybe OT: OrdCreate with Unique Clausule

Post by ukoenig »

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

Image

I hoüpe it helps

regards
Uwe :D
Last edited by ukoenig on Thu Apr 28, 2016 12:47 pm, edited 1 time in total.
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.
hidroxid
Posts: 28
Joined: Sun Apr 24, 2011 12:50 am

Re: Maybe OT: OrdCreate with Unique Clausule

Post by hidroxid »

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!
Post Reply