From: Geoff Schaller on 26 Sep 2006 18:09 JC, The others have commented enough on the pure coding matters - I too would want to see no use of the word static, separated lines and better use of local variables but what also concerns me is the concept of your order creation. I highly suspect that you should be looking at a custom index rather this dependent index but without knowing the rest of the business logic, it is a bit difficult to assess. Geoff "JC" <jc(a)san.psi.br> wrote in message news:1159275045.323551.175360(a)i3g2000cwc.googlegroups.com: > Before in 2,6 VO I had these lines... that they functioned... > > static global mtr as dbServer > static global sit as dbServer > static global alu as dbServer > static global aalt as string > static global aasm as string > static global tura as string > // These variaveis have that to be static to be able to be compiled, if > not the compiler of the error... > > cod:=GeraTMP(GetEnv('TMP'),'\RSCA',mtr:OrderInfo(DBOI_INDEXEXT)) ; > AAdd(aTmp,cod+mtr:OrderInfo(DBOI_INDEXEXT)) > mtr:SetOrderCondition( "", {||! > > mtr:DELETED.and.mtr:aaLt+mtr:aaSm+mtr:tura==aalt+aasm+tura.and.sit:SEEK(mtr:sitf).and.sit:sit4},.T.,,,, > ,,,,,,,,) > > mtr:ClearIndex() ; mtr:CreateIndex(cod,"alu:alu2+mtr:alu1", > {||alu:SEEK(mtr:alu1),alu:alu2+mtr:alu1}, .T. ) ; mtr:GoTop() > //Unique > > Now with in the 2,7 it does not create unico indice.... > > Jose Claudio
From: Geoff Schaller on 26 Sep 2006 18:10
...not if he is using ntx etc. "Marcos Nogueira" <marcos.nogueira(a)ig.com.br> wrote in message news:1159288977.004684.184970(a)e3g2000cwe.googlegroups.com: > Jose Claudio, > > > ... > > mtr:ClearIndex() ; mtr:CreateIndex(cod,"alu:alu2+mtr:alu1", > > {||alu:SEEK(mtr:alu1),alu:alu2+mtr:alu1}, .T. ) ; mtr:GoTop() > > > Try replacing CreateIndex() with CreateOrder(). > > Abra?os, > > Marcos Nogueira > S. Paulo - Brazil |