using memo fields on the fly?

Kenneth Brody kenbrody at bestweb.net
Mon Oct 17 16:03:11 PDT 2005


Quoting Dan Coutu (Mon, 17 Oct 2005 17:08:11 -0400):

> Kenneth Brody wrote:
[...Building memo field from other fields...]
> >Have you tried:
> >
> >    my_memo = comment_1 < comment_2 < comment_3
> >
> Okay, so I tried to build on this idea. Basically I'm writing processing
> table code that has no human user interface. It is used in automated
> processes. So I had made a filePro database whose purpose in life was to
> contain the code. Because of this the fields in the database are
> actually useless. So made a new field, defined it as a memo field, and
> then tried this type of code logic:
>
> Note: field 2 is a memo field.
>
> if:   ' Test value for recnum field, field 2
> then: rn(8,.0)="93414"
> if:  ' Initialize the memo to be empty.
> then: 2 = ""
> if:
> then: lookup tbl=detail i=B k=rn -ng
> loop:
> if: not tbl
> then: goto done
> if: tbl(2) ne rn
> then: goto done
> if: tbl(5) ne ""
> then: 2 = 2 < tbl(5)
> if:
> then: getnext tbl
> if:
> then: goto loop
> done:
> if:
> then: close tbl
> if:
> then: end
>
> Seems pretty straightforward. Yet it crashes and burns with a
> segmentation violation every time. Seems like I should be able to append
> stuff to a memo field right?
>
> Am I missing something?

What length/type are field 2 and tbl(5)?

On which line does it SEGV?

--
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