Problem with scopes

Problem with scopes

Postby StefanHaupt » Thu Oct 16, 2008 8:38 am

Hi all,

I have a curious problem using scopes.


My scenario:

I have a database with a field named "gruppe1", the dbf is indexed on this field (index on Lower(Gruppe1) tag ...) and this tag has the focus.

Now I want the set the scope on articles of a certain group called "alufelgen". The scope is working with the exception that articles of the group "alufelgen-gebr" are also in this scope and they should not.

Code: Select all  Expand view
SET SCOPE TO "alufelgen","alufelgen"


After reading the doku I found that the content of the field is compared against the expression of the scope.

That means, "alufelgen-gebr" < "alufelgen" is .t., even if SET EXACT is ON.

Does anyone have an idea how to solve this problem and to change the behavior of ordscope() ?

Thanks
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Re: Problem with scopes

Postby Enrico Maria Giordano » Thu Oct 16, 2008 9:17 am

Code: Select all  Expand view
SET SCOPE TO PadR( "alufelgen", Len( gruppe1 ) ),PadR( "alufelgen", Len( gruppe1 ) )


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8568
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby StefanHaupt » Mon Oct 20, 2008 7:16 am

Enrico,

that´s it :D .

Many thanks
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 51 guests