SET SCOPE sample

Post Reply
Ehab Samir Aziz
Posts: 334
Joined: Fri Oct 14, 2005 1:54 pm

SET SCOPE sample

Post by Ehab Samir Aziz »

I searched over all samples for the syntax for set scope and I could not find any .
Pls tell me How can I use SET SCOPE ? especially with variable conditions &(conditions) .
Thanks
Mike Buckler
Posts: 67
Joined: Thu Jan 05, 2006 10:35 pm
Location: Canada
Contact:

Post by Mike Buckler »

Code: Select all

#IFDEF _setads
ordscope(0,(da1))
#else
set scopetop to (da1)
#endif

#IFDEF _setads
ordscope(1,(da2))
#else
set scopebottom to (da2)
#endif
This is how I do it
The file is indexed on date field.
ads uses 0 to scope top and 1 for scope bottom.
non ads uses 1 to scope top and 2 for scope bottom.
Ehab Samir Aziz
Posts: 334
Joined: Fri Oct 14, 2005 1:54 pm

Post by Ehab Samir Aziz »

where can I put my condition eg. date > 31/12/2006
Arvisnet
Posts: 51
Joined: Sat Nov 19, 2005 8:30 pm
Contact:

ordscope

Post by Arvisnet »

Sample:
index: tienda + Dtos(fecha)

my var's"
ctienda
dFecha

from tienda x , fecha y
To tienda n , fecha z

DbSelectArea("VentaSuc") ; VentaSuc->(ORDSETFOCUS("TIENDAFEC")) ; VentaSuc->(DbGotop())
VentaSuc->(OrdScope(0, ctienda+ Dtos(dFecha ) ) )
VentaSuc->(OrdScope(1, ctienda + Dtos(dFecha ) ) ) ; VentaSuc->(DbGotop())

format:

ORDSCOPE(0,yourFirstRecord) //topscope
ORDSCOPE(1,yourEndRecord) //bottomscope
yourDBf->(DbGotop())
Ehab Samir Aziz
Posts: 334
Joined: Fri Oct 14, 2005 1:54 pm

Post by Ehab Samir Aziz »

I am sorry some English is better than some Spanish I am Very Sorry I can not understand this . Also I have multiple variable conditions . May I have to index my DBF according the multiple variable conditions .

filter =="upper(Name)="EHAB" .AND. age < 30
.and. (4->me_date) > (dtos date_from) .and. ;
(4->me_date) < dtos(date_to) "

..
set filter to &(filter)
..
etc
Post Reply