INDEX FOR problem

INDEX FOR problem

Postby Marc Vanzegbroeck » Thu Aug 16, 2007 11:44 am

Hi,

I got a strange error.
i use in my program
Code: Select all  Expand view  RUN
         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
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Postby Antonio Linares » Thu Aug 16, 2007 12:54 pm

Marc,

Are you using Harbour or xHarbour ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Marc Vanzegbroeck » Thu Aug 16, 2007 3:56 pm

Antonio,

I'm using xHarbour.

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

Postby Antonio Linares » Thu Aug 16, 2007 5:00 pm

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Marc Vanzegbroeck » Fri Aug 17, 2007 8:34 am

The same result with harbour :cry:

Regards,
Marc
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Postby kokookao2007 » Fri Aug 17, 2007 9:32 am

hi Marc :

What is your RDD ?
User avatar
kokookao2007
 
Posts: 59
Joined: Thu May 17, 2007 8:27 am

Postby Antonio Linares » Fri Aug 17, 2007 9:56 am

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Marc Vanzegbroeck » Fri Aug 17, 2007 12:11 pm

Hi,

I'am using DBFCDX.

If I remove the brackets like:
Code: Select all  Expand view  RUN
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  Expand view  RUN
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  Expand view  RUN
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
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Postby Antonio Linares » Fri Aug 17, 2007 12:21 pm

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
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Enrico Maria Giordano » Fri Aug 17, 2007 12:24 pm

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

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

Postby Antonio Linares » Fri Aug 17, 2007 12:27 pm

Enrico,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Marc Vanzegbroeck » Fri Aug 17, 2007 12:50 pm

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
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Postby Antonio Linares » Fri Aug 17, 2007 1:44 pm

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
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Enrico Maria Giordano » Fri Aug 17, 2007 2:20 pm

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
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Antonio Linares » Fri Aug 17, 2007 2:31 pm

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
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 52 guests