SET SCOPE sample

SET SCOPE sample

Postby Ehab Samir Aziz » Sat Apr 08, 2006 9:13 pm

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
Ehab Samir Aziz
 
Posts: 334
Joined: Fri Oct 14, 2005 1:54 pm

Postby Mike Buckler » Sun Apr 09, 2006 12:48 am

Code: Select all  Expand view
#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.
Mike Buckler
 
Posts: 67
Joined: Thu Jan 05, 2006 10:35 pm
Location: Canada

Postby Ehab Samir Aziz » Sun Apr 09, 2006 3:52 pm

where can I put my condition eg. date > 31/12/2006
Ehab Samir Aziz
 
Posts: 334
Joined: Fri Oct 14, 2005 1:54 pm

ordscope

Postby Arvisnet » Sun Apr 09, 2006 6:13 pm

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())
Arvisnet
 
Posts: 51
Joined: Sat Nov 19, 2005 8:30 pm

Postby Ehab Samir Aziz » Sun Apr 09, 2006 6:50 pm

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
Ehab Samir Aziz
 
Posts: 334
Joined: Fri Oct 14, 2005 1:54 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 37 guests