Maybe OT: OrdCreate with Unique Clausule

Maybe OT: OrdCreate with Unique Clausule

Postby hidroxid » 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
hidroxid
 
Posts: 30
Joined: Sun Apr 24, 2011 12:50 am

Re: Maybe OT: OrdCreate with Unique Clausule

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

Re: Maybe OT: OrdCreate with Unique Clausule

Postby ukoenig » Thu Apr 28, 2016 8: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

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

Re: Maybe OT: OrdCreate with Unique Clausule

Postby hidroxid » 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!
hidroxid
 
Posts: 30
Joined: Sun Apr 24, 2011 12:50 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 75 guests