[Progress Communities] [Progress OpenEdge ABL] Forum Post: Dynamic find/for each on status fails - expected behaviour?

Status
Not open for further replies.
D

DenDuze

Guest
Hi, Maybe is the following expected behaviour but I was wondering why it is possible for a developer to make a mistake like this. In a static temp-table you can NOT create a field 'status', Progress does not allow that! But if you create a dynamic temp-table there is no problem to add a field 'status' (add-new-field). Also can you fill that field with data, that's no problem. You can even use that data when you work with buffer:buffer-field('status');buffer-value. But if you want to use it like buffer::status you will get an Progress Error. I can understand this from a compilers point of view but it's confusing. The greater problem is that you can't use a hbuffer:find-first or a dynamic query-phrase with a selection on 'status'. That will always give a run-time error Like I said, I can understand why the compiler does not complain about these dynamic created fields. But why Progress allowes you that you can create those protected-fields (like 'status') and let you fill them with data and even let you use those values in (some) statements but doesn't let you select some records based on that field @run-time is strange to me. Is that expected behaviour? Should Progress not better warn a developer if he/she creates a protected field (like 'status' in a temp-table (@compile or @run-time). Or can Progress adjust the query-engine so these fields can be used (all fields that can be created should be allowed in queries I guess) Or is there already some possibility to use those fields in a query? I found that problem when I was developing a program that will generate a dataset and buffers based on some file that was provided to that program. In that file these is a field that is called 'status' so it was created fine but at some point I hit this query problem. If it's expected behaviour that some fields can not be used this way I will need to add some transformation for those fields because I never know what can come in. Is there some list of what fields that are not allowed to use this way? Regards Didier

Continue reading...
 
Status
Not open for further replies.
Top