Page 1 of 2

INDEX FOR problem

Posted: Thu Aug 16, 2007 11:44 am
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

Posted: Thu Aug 16, 2007 12:54 pm
by Antonio Linares
Marc,

Are you using Harbour or xHarbour ?

Posted: Thu Aug 16, 2007 3:56 pm
by Marc Vanzegbroeck
Antonio,

I'm using xHarbour.

Marc

Posted: Thu Aug 16, 2007 5:00 pm
by Antonio Linares
Could you please try to build your app using Harbour ? thanks,

Posted: Fri Aug 17, 2007 8:34 am
by Marc Vanzegbroeck
The same result with harbour :cry:

Regards,
Marc

Posted: Fri Aug 17, 2007 9:32 am
by kokookao2007
hi Marc :

What is your RDD ?

Posted: Fri Aug 17, 2007 9:56 am
by Antonio Linares
Yes, good question, what RDD are you using ?

Posted: Fri Aug 17, 2007 12:11 pm
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

Posted: Fri Aug 17, 2007 12:21 pm
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

Posted: Fri Aug 17, 2007 12:24 pm
by Enrico Maria Giordano
We need of a reduced and self-contained sample to confirm the problem.

EMG

Posted: Fri Aug 17, 2007 12:27 pm
by Antonio Linares
Enrico,

The problem is that Marc comments that on small samples is working fine

Posted: Fri Aug 17, 2007 12:50 pm
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

Posted: Fri Aug 17, 2007 1:44 pm
by Antonio Linares
Marc,

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

Posted: Fri Aug 17, 2007 2:20 pm
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

Posted: Fri Aug 17, 2007 2:31 pm
by Antonio Linares
Marc,

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