Copy to command from empty record set - bug or by design?

Kenneth Brody kenbrody at bestweb.net
Tue Jan 23 15:43:07 PST 2007


Quoting Tyler (Tue, 23 Jan 2007 15:34:14 -0700):

> I can't tell if this is a bug in filePro or not - anyone know?
>
> I have some code with insufficient error checking that produced an
> interesting result.  In some input processing, I have a lookup that
> fails (the qualifier has no records in it).  I then get a free record
> from another qualifier, and copy the (failed!) lookup to it.
> Shouldn't this error out at this point?  Instead, I get a record full
> of 0x00 characters (with some occasional weird non-nulls).
[...]
> ::lookup rweb = kinotox  k=1    i=A -npx:
> ::lookup live = kinotox at hh  r=free  -e:
> ::copy rweb to live; write live:
[...]

Yes, the COPY should have failed with a "lookup not performed" error,
just as if you had done something like:

    live[1] = rweb[1]

You should, of course, have a check after the first lookup to verify
that it succeeded.  (After all, you have told filePro that you were
going to do this, having passed the "-n" flag.)  However, filePro
should have reported the error when you hit the COPY statement.

(Added cc to fpsupport.)

--
KenBrody at BestWeb dot net        spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com


More information about the Filepro-list mailing list