INDEX FOR problem

Marc Vanzegbroeck
Posts: 1102
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium
Contact:

INDEX FOR problem

Post by Marc Vanzegbroeck »

Hi,

I got a strange error.
i use in my program

Code: Select all

         use lvrlog new
         INDEX ON str(val(type),2)+str(val(noden),2)+str(val(modn),2) TAG MODULE for val(modn)#0
         msginfo(ordfor())
         INDEX ON str(val(type),2)+str(val(noden),2)                  TAG PM     for (nr = '4' .or. nr = '6') .and. nodet # 'HG' .and. nodet # 'NIM'
         msginfo(ordfor())

   
In the first message the filtering is shown but in the second it's empty. Also if I browse the database, all records are shown.
If I create a small test-program, everything works fine.
Does anyone have a clue why this happend in my main program?

Thanks
Marc
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Marc,

Are you using Harbour or xHarbour ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
Marc Vanzegbroeck
Posts: 1102
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium
Contact:

Post by Marc Vanzegbroeck »

Antonio,

I'm using xHarbour.

Marc
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Could you please try to build your app using Harbour ? thanks,
regards, saludos

Antonio Linares
www.fivetechsoft.com
Marc Vanzegbroeck
Posts: 1102
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium
Contact:

Post by Marc Vanzegbroeck »

The same result with harbour :cry:

Regards,
Marc
User avatar
kokookao2007
Posts: 59
Joined: Thu May 17, 2007 8:27 am

Post by kokookao2007 »

hi Marc :

What is your RDD ?
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Yes, good question, what RDD are you using ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
Marc Vanzegbroeck
Posts: 1102
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium
Contact:

Post by Marc Vanzegbroeck »

Hi,

I'am using DBFCDX.

If I remove the brackets like:

Code: Select all

INDEX ON str(val(type),2)+str(val(noden),2)                  TAG PM     for nr = '4' .or. nr = '6' .and. nodet # 'HG' .and. nodet # 'NIM'
instead of

Code: Select all

INDEX ON str(val(type),2)+str(val(noden),2)                  TAG PM     for (nr = '4' .or. nr = '6') .and. nodet # 'HG' .and. nodet # 'NIM'
Then it's working. Unfortunately this is not what I want :cry:

At the moment I use as workaround:

Code: Select all

INDEX ON str(val(type),2)+str(val(noden),2)                  TAG PM     for  alltrim(nr) $ '46' .and. !alltrim(nodet) $ 'HGNIM'
and that is also working.

Very strange that the other index-filter doesn't work.

Marc
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Marc,

> for (nr = '4' .or. nr = '6') .and. nodet # 'HG' .and. nodet # 'NIM'

Try this:
for nr $ "4;6" .and. nodet # 'HG' .and. nodet # 'NIM'

Anyhow this issue has to be commented to the RDD's guru, Przemek
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post by Enrico Maria Giordano »

We need of a reduced and self-contained sample to confirm the problem.

EMG
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Enrico,

The problem is that Marc comments that on small samples is working fine
regards, saludos

Antonio Linares
www.fivetechsoft.com
Marc Vanzegbroeck
Posts: 1102
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium
Contact:

Post by Marc Vanzegbroeck »

Antonio,

for nr $ "4;6" .and. nodet # 'HG' .and. nodet # 'NIM' is working.

I think it's someting to do with the brackets because I also create a other index with brackets in my program, and that one is also not working.
Now I also use there a workaround without brackets.

Thanks,
Marc
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Marc,

Przemek will be back next week and then we should report him this issue, just to know his opinion
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post by Enrico Maria Giordano »

Antonio Linares wrote:Enrico,

The problem is that Marc comments that on small samples is working fine
Then Marc should gradually remove parts of his code to restrict the cause of the problem. I don't think it's a bug in DBFCDX.

EMG
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Marc,

Could you check the resulting PPO when it fails to see if it is related to the preprocessor ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply