using memo fields on the fly?

Dan Coutu coutu at snowy-owl.com
Mon Oct 17 14:08:11 PDT 2005


Kenneth Brody wrote:

>Quoting Dan Coutu (Mon, 17 Oct 2005 15:54:58 -0400):
>
>  
>
>>I'm trying to assemble a collection of test fragments that are stored in
>>fields with a (500,*) edit so that they make up a single body of text.
>>Naturally this seems to fit the description of a memo field.
>>
>>It seems, from what I can decipher, that you can only populate a memo
>>field from a file though. I was hoping to populate it via code logic by
>>appending multiple fields onto a single memo field.
>>    
>>
>[...]
>
>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?

Dan



More information about the Filepro-list mailing list