FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour INDEX FOR problem
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
INDEX FOR problem
Posted: Thu Aug 16, 2007 11:44 AM
Hi,

I got a strange error.
i use in my program
         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
Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
INDEX FOR problem
Posted: Thu Aug 16, 2007 12:54 PM

Marc,

Are you using Harbour or xHarbour ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
INDEX FOR problem
Posted: Thu Aug 16, 2007 03:56 PM

Antonio,

I'm using xHarbour.

Marc

Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
INDEX FOR problem
Posted: Thu Aug 16, 2007 05:00 PM

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

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
INDEX FOR problem
Posted: Fri Aug 17, 2007 08:34 AM

The same result with harbour :cry:

Regards,
Marc

Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 59
Joined: Thu May 17, 2007 08:27 AM
INDEX FOR problem
Posted: Fri Aug 17, 2007 09:32 AM

hi Marc :

What is your RDD ?

-------------

best regards

kokoo Kao
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
INDEX FOR problem
Posted: Fri Aug 17, 2007 09:56 AM

Yes, good question, what RDD are you using ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
INDEX FOR problem
Posted: Fri Aug 17, 2007 12:11 PM
Hi,

I'am using DBFCDX.

If I remove the brackets like:
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
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 :-)

At the moment I use as workaround:
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
Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
INDEX FOR problem
Posted: 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
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
INDEX FOR problem
Posted: Fri Aug 17, 2007 12:24 PM

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

EMG

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
INDEX FOR problem
Posted: 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
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
INDEX FOR problem
Posted: 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

Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
INDEX FOR problem
Posted: Fri Aug 17, 2007 01: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
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
INDEX FOR problem
Posted: Fri Aug 17, 2007 02: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
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
INDEX FOR problem
Posted: Fri Aug 17, 2007 02: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