Yes. I'm thinking of single-letter wrapper functions to wrap the = wordiness, making code a bit easier to write... Something like:
lcString =3D NZ(TEXTMERGE(Z(lcMergeText)))
> Someone else on this forum pointed out the chr(0) solution=20 > (Paul McNett or Dan Covill?). I ended up using the wordy=20 > solution that you posted for the same reason that you gave -=20 > wrapping this in a function would affect the scope of=20 > variables exposed to the textmerge() function. >=20 > I think(?) this is one of those gotchas that gets classified=20 > as a "live with it" type of workaround. >=20 > BTW: I believe this is a VFP 7 specific bug??? I wonder if=20 > this bug is fixed in VFP 8 ??? >=20 > Malcolm >=20 > <snip> > Hello. It appears TEXTMERGE() has a bug in it(discussed in=20 > thread #666832 on UT). Basically, it doesn't always terminate=20 > the string you pass to it, and therefore you get intermittent=20 > C0000005's. The suggested fix is to add CHR(0), and then=20 > strip it out later-- something like: >=20 > lcString =3D STRTRAN(TEXTMERGE(lcMergeText+CHR(0)),CHR(0),"") >=20 > I could do this, but I'm wondering if anyone else has a=20 > cleaner solution/workaround? I could create a wrapper=20 > function, but TEXTMERGE would then be operating in a=20 > different scope, and my variables/fields wouldn't resolve=20 > properly when TEXTMERGE() is called. Thanks for any ideas. > </snip> >=20 >=20 [excessive quoting removed by server]
©2003 Derek J. Kalweit |