Question Extent fields and date calculation failure. Looking for the original thread.

Cecil

19+ years progress programming and still learning.
Hi all.

Sorry in advance for not giving more information, I'm trying to do write this post from memory

I remember seeing a thread either on the progresstalk.com or community.progress.com last year relating to 11.7.x and extent fields not working correctly in a query statement.

As I remember it, it was like this the extent position value ([x]) was being calculated by subtracting one date from another resulting in a value between 1-7. However, this was being called inside a query which would fail in a STOP condition or similar. This was existing legacy code which stopped working correctly after upgrading to 11.7.x

Example of the query which was failing:

Code:
find first sometable no-lock
    where sometable.extentfield[lastknowndate - currentknowndate + 1] = TRUE
    no-error.
I believe the solution was to have an integer variable in the extent value rather than having an inline calculation.

Workaround code:

Code:
day = lastknowndate - currentknowndate + 1.

find first sometable no-lock
    where sometable.extentfield[day] = TRUE
    no-error.

Could somebody point me to this thread as I would like to know if this is a new bug in 11.7? Or, it was going to be fixed in a later service pack. It's just somebody I know is experiencing this problem on 11.7.4.

Thanks in advance.
James.
 
Last edited:
Hi didn't know it was possible to use date as extend position .

Maybe convert the date in number of day to make it works or using the weekday function.
 

Cecil

19+ years progress programming and still learning.
Hi didn't know it was possible to use date as extend position .

Maybe convert the date in number of day to make it works or using the weekday function.
I *think* the real problem is having an inline calculation inside the extent [ ] position value when being using inside a query statement. We have the workaround solution which is just better coding style, but we would like to know if this is a known issue from Progress.
 

Cringer

ProgressTalk.com Moderator
Staff member
I vaguely remember the post - it was on communities, but I can't say if it's an outstanding issue or not, but you should avoid the inline calculation like the plague. In particular when the calculation is on the left hand side of the predicate - it forces a full table read on the query which could be pretty nasty.
 

Cecil

19+ years progress programming and still learning.
Also, just to add a curve ball, the issue only happens in the application and cannot be reproduced from the IDE.
 
Top