main logo
Subject: RE: TEXTMERGE()
Author: "Malcolm Greene"
Posted: 2003/02/28 15:35:00
 
View Entire Thread
New Search


Derek,

Someone else on this forum pointed out the chr(0) solution (Paul McNett =
or Dan Covill?). I ended up using the wordy solution that you posted for =
the same reason that you gave - wrapping this in a function would affect =
the scope of variables exposed to the textmerge() function.

I think(?) this is one of those gotchas that gets classified as a "live =
with it" type of workaround.

BTW: I believe this is a VFP 7 specific bug??? I wonder if this bug is =
fixed in VFP 8 ???

Malcolm

<snip>
Hello. It appears TEXTMERGE() has a bug in it(discussed in thread =
#666832 on UT). Basically, it doesn't always terminate the string you =
pass to it, and therefore you get intermittent C0000005's. The suggested =
fix is to add CHR(0), and then strip it out later-- something like:

lcString =3D STRTRAN(TEXTMERGE(lcMergeText+CHR(0)),CHR(0),"")

I could do this, but I'm wondering if anyone else has a cleaner =
solution/workaround? I could create a wrapper function, but TEXTMERGE =
would then be operating in a different scope, and my variables/fields =
wouldn't resolve properly when TEXTMERGE() is called. Thanks for any =
ideas.
</snip>




 
©2003 Malcolm Greene
<-- Prior Message New Search Next Message -->