Interesting bug/feature

Dr. A.S.J. Botenga MD bv.wallewijn at planet.nl
Mon Jul 7 22:24:32 PDT 2008


op 08-07-2008 05:53 schreef James Rea op jim at provue.com:

>> Preliminary testing suggests that, in a procedure, a Select command
>> which selects an empty set will invalidate all subsequent field-
>> related commands (until a non-empty set is selected) but will allow
>> Print (and perhaps other) commands.
>> 
>> For example,
>> 
>> SelectA = ""      ; where A has no null values
>> Fill B "hello"
>> Print ""
>> 
>> will not fill field B but will print the database.  If, however,
>> SelectAll is inserted after the first line, all is well.  I know that
>> it is poor programming to omit the SelectAll command but it is
>> possible to do so and, more importantly, its omission can generate a
>> quite baffling error.  It appears that an empty result of a select
>> command has the effect of the rest of the procedure operating on an
>> empty database.
> 
> This is a feature and has been documented from day one. Surely in the
> example you list above you don't want the result to be that field B in
> every record is filled with "hello"? Now that would be a serious bug
> that would destroy data left and right.
> 
> If you want to be more explicit about it you can do this:
> 
> select A=""
> if info("empty")=false()
> field B
> fill "hello
> endif
> print ""
> 
> By the way, your original example
> 
> Fill B "hello"
> 
> won't work in any case, it must be
> 
> Field B
> fill "hello"
> 
> Jim Rea
> President, ProVUE Development
> 
Why not without making a selection

field B formulafill ?(A="","hello",B)

Allard



More information about the Qna mailing list