Hi gurus,

I am using VFP7 SP1.

This result is correct:
?LEN(MyTable.MyMemoField)
558

This result is incorrect:
?LEN(TRANSFORM(MyTable.MyMemoField))
256

lcText = MyTable.MyMemoField
?LEN(TRANSFORM(lcText))
558

If i try this in VFP 7 without the SP or in VFP 8, I get 558 in all
instances.
Have anybody faced an issue as such?

Kind Regards,
Devapriya De Silva

Re: Strange behaviour of TRANSFORM function by Roger

Roger
Tue Aug 10 08:23:06 CDT 2004

You're right. I get the same results.
However, why would you want to use Transform on memo field?
The documentation says that no transformation is performed.
Ah well, back to work.

-Roger
--
Roger Ansell
Adelaide, Australia

My real email address is ransell at senet dot com dot au

"Devapriya De Silva" <ddesilva@qa-software.com> wrote in message
news:%236wKVAtfEHA.3024@TK2MSFTNGP10.phx.gbl...
Hi gurus,

I am using VFP7 SP1.

This result is correct:
?LEN(MyTable.MyMemoField)
558

This result is incorrect:
?LEN(TRANSFORM(MyTable.MyMemoField))
256

lcText = MyTable.MyMemoField
?LEN(TRANSFORM(lcText))
558

If i try this in VFP 7 without the SP or in VFP 8, I get 558 in all
instances.
Have anybody faced an issue as such?

Kind Regards,
Devapriya De Silva




Re: Strange behaviour of TRANSFORM function by Ook

Ook
Tue Aug 10 09:20:07 CDT 2004

I almost always use TRANSFORM(ALLTRIM( MyField )). It's more reliable in
cases where you may have trailing spaces.

What is in the memo field that you are working with?

"Devapriya De Silva" <ddesilva@qa-software.com> wrote in message
news:%236wKVAtfEHA.3024@TK2MSFTNGP10.phx.gbl...
> Hi gurus,
>
> I am using VFP7 SP1.
>
> This result is correct:
> ?LEN(MyTable.MyMemoField)
> 558
>
> This result is incorrect:
> ?LEN(TRANSFORM(MyTable.MyMemoField))
> 256
>
> lcText = MyTable.MyMemoField
> ?LEN(TRANSFORM(lcText))
> 558
>
> If i try this in VFP 7 without the SP or in VFP 8, I get 558 in all
> instances.
> Have anybody faced an issue as such?
>
> Kind Regards,
> Devapriya De Silva
>
>



Re: Strange behaviour of TRANSFORM function by Devapriya

Devapriya
Tue Aug 10 23:00:30 CDT 2004

I write a function ("MyFunc(Transform(Expr),"A",12") to the Expr field in a
report.(copy of the report)
Then when the report is run it evaluates my function and then myfunction
writes the contents to a text file.
This text file is then processed.

The field type that is mapped to the report could be numeric, logical, date
etc., and therefore I have to use transform.

Thanks anyway.
Kind Regards,
Devapriya De Silva

"Roger Ansell" <notmyreal@emailaddress.com> wrote in message
news:2ns0htF3p8lmU1@uni-berlin.de...
> You're right. I get the same results.
> However, why would you want to use Transform on memo field?
> The documentation says that no transformation is performed.
> Ah well, back to work.
>
> -Roger
> --
> Roger Ansell
> Adelaide, Australia
>
> My real email address is ransell at senet dot com dot au
>
> "Devapriya De Silva" <ddesilva@qa-software.com> wrote in message
> news:%236wKVAtfEHA.3024@TK2MSFTNGP10.phx.gbl...
> Hi gurus,
>
> I am using VFP7 SP1.
>
> This result is correct:
> ?LEN(MyTable.MyMemoField)
> 558
>
> This result is incorrect:
> ?LEN(TRANSFORM(MyTable.MyMemoField))
> 256
>
> lcText = MyTable.MyMemoField
> ?LEN(TRANSFORM(lcText))
> 558
>
> If i try this in VFP 7 without the SP or in VFP 8, I get 558 in all
> instances.
> Have anybody faced an issue as such?
>
> Kind Regards,
> Devapriya De Silva
>
>
>



Re: Strange behaviour of TRANSFORM function by Devapriya

Devapriya
Tue Aug 10 23:01:34 CDT 2004

I cannot use alltrim as the field could be in anytype.

Kind Regards,
Devapriya De Silva

"Ook" <usenet@nospam.emberts.com> wrote in message
news:ua0UjUufEHA.592@TK2MSFTNGP11.phx.gbl...
> I almost always use TRANSFORM(ALLTRIM( MyField )). It's more reliable in
> cases where you may have trailing spaces.
>
> What is in the memo field that you are working with?
>
> "Devapriya De Silva" <ddesilva@qa-software.com> wrote in message
> news:%236wKVAtfEHA.3024@TK2MSFTNGP10.phx.gbl...
> > Hi gurus,
> >
> > I am using VFP7 SP1.
> >
> > This result is correct:
> > ?LEN(MyTable.MyMemoField)
> > 558
> >
> > This result is incorrect:
> > ?LEN(TRANSFORM(MyTable.MyMemoField))
> > 256
> >
> > lcText = MyTable.MyMemoField
> > ?LEN(TRANSFORM(lcText))
> > 558
> >
> > If i try this in VFP 7 without the SP or in VFP 8, I get 558 in all
> > instances.
> > Have anybody faced an issue as such?
> >
> > Kind Regards,
> > Devapriya De Silva
> >
> >
>
>



Re: Strange behaviour of TRANSFORM function by Stefan

Stefan
Wed Aug 11 03:17:01 CDT 2004

Hi Devapriya,

Your code works as expected in Vfp8 SP1
However, memo content does not always behave _exactly like a
character string does - if so, you can add an "" beforehand, e.g.

CREATE CURSOR temp (test M)
INSERT INTO temp VALUES (REPLICATE('x',500))

#if VERSION(5) >= 800
? LEN(TRANSFORM(test)) && returns 500 in Vfp8/9

#else
? LEN(TRANSFORM(""+test)) && works in Vfp7
#endif

BTW, Transform() was improved in Vfp8 anyway and also
works much faster now than it did previously


hth
-Stefan

"Devapriya De Silva" <ddesilva@qa-software.com> schrieb im Newsbeitrag
news:eTAcDf1fEHA.1188@TK2MSFTNGP11.phx.gbl...
> I write a function ("MyFunc(Transform(Expr),"A",12") to the Expr field in a
> report.(copy of the report)
> Then when the report is run it evaluates my function and then myfunction
> writes the contents to a text file.
> This text file is then processed.
>
> The field type that is mapped to the report could be numeric, logical, date
> etc., and therefore I have to use transform.
>
> Thanks anyway.
> Kind Regards,
> Devapriya De Silva
>
> "Roger Ansell" <notmyreal@emailaddress.com> wrote in message
> news:2ns0htF3p8lmU1@uni-berlin.de...
> > You're right. I get the same results.
> > However, why would you want to use Transform on memo field?
> > The documentation says that no transformation is performed.
> > Ah well, back to work.
> >
> > -Roger
> > --
> > Roger Ansell
> > Adelaide, Australia
> >
> > My real email address is ransell at senet dot com dot au
> >
> > "Devapriya De Silva" <ddesilva@qa-software.com> wrote in message
> > news:%236wKVAtfEHA.3024@TK2MSFTNGP10.phx.gbl...
> > Hi gurus,
> >
> > I am using VFP7 SP1.
> >
> > This result is correct:
> > ?LEN(MyTable.MyMemoField)
> > 558
> >
> > This result is incorrect:
> > ?LEN(TRANSFORM(MyTable.MyMemoField))
> > 256
> >
> > lcText = MyTable.MyMemoField
> > ?LEN(TRANSFORM(lcText))
> > 558
> >
> > If i try this in VFP 7 without the SP or in VFP 8, I get 558 in all
> > instances.
> > Have anybody faced an issue as such?
> >
> > Kind Regards,
> > Devapriya De Silva
> >
> >
> >
>
>


Re: Strange behaviour of TRANSFORM function by Ook

Ook
Wed Aug 11 09:05:27 CDT 2004

ALLTRIM( TRANSFORM( MyField ))


"Devapriya De Silva" <ddesilva@qa-software.com> wrote in message
news:esaPnf1fEHA.3932@TK2MSFTNGP09.phx.gbl...
> I cannot use alltrim as the field could be in anytype.
>
> Kind Regards,
> Devapriya De Silva
>
> "Ook" <usenet@nospam.emberts.com> wrote in message
> news:ua0UjUufEHA.592@TK2MSFTNGP11.phx.gbl...
> > I almost always use TRANSFORM(ALLTRIM( MyField )). It's more reliable in
> > cases where you may have trailing spaces.
> >
> > What is in the memo field that you are working with?
> >
> > "Devapriya De Silva" <ddesilva@qa-software.com> wrote in message
> > news:%236wKVAtfEHA.3024@TK2MSFTNGP10.phx.gbl...
> > > Hi gurus,
> > >
> > > I am using VFP7 SP1.
> > >
> > > This result is correct:
> > > ?LEN(MyTable.MyMemoField)
> > > 558
> > >
> > > This result is incorrect:
> > > ?LEN(TRANSFORM(MyTable.MyMemoField))
> > > 256
> > >
> > > lcText = MyTable.MyMemoField
> > > ?LEN(TRANSFORM(lcText))
> > > 558
> > >
> > > If i try this in VFP 7 without the SP or in VFP 8, I get 558 in all
> > > instances.
> > > Have anybody faced an issue as such?
> > >
> > > Kind Regards,
> > > Devapriya De Silva
> > >
> > >
> >
> >
>
>



Re: Strange behaviour of TRANSFORM function by Devapriya

Devapriya
Thu Aug 12 01:25:38 CDT 2004

Back to square one.
This truncates my data in vfp7 sp1

"Ook" <usenet@nospam.emberts.com> wrote in message
news:OIW2Ax6fEHA.904@TK2MSFTNGP09.phx.gbl...
> ALLTRIM( TRANSFORM( MyField ))
>
>
> "Devapriya De Silva" <ddesilva@qa-software.com> wrote in message
> news:esaPnf1fEHA.3932@TK2MSFTNGP09.phx.gbl...
> > I cannot use alltrim as the field could be in anytype.
> >
> > Kind Regards,
> > Devapriya De Silva
> >
> > "Ook" <usenet@nospam.emberts.com> wrote in message
> > news:ua0UjUufEHA.592@TK2MSFTNGP11.phx.gbl...
> > > I almost always use TRANSFORM(ALLTRIM( MyField )). It's more reliable
in
> > > cases where you may have trailing spaces.
> > >
> > > What is in the memo field that you are working with?
> > >
> > > "Devapriya De Silva" <ddesilva@qa-software.com> wrote in message
> > > news:%236wKVAtfEHA.3024@TK2MSFTNGP10.phx.gbl...
> > > > Hi gurus,
> > > >
> > > > I am using VFP7 SP1.
> > > >
> > > > This result is correct:
> > > > ?LEN(MyTable.MyMemoField)
> > > > 558
> > > >
> > > > This result is incorrect:
> > > > ?LEN(TRANSFORM(MyTable.MyMemoField))
> > > > 256
> > > >
> > > > lcText = MyTable.MyMemoField
> > > > ?LEN(TRANSFORM(lcText))
> > > > 558
> > > >
> > > > If i try this in VFP 7 without the SP or in VFP 8, I get 558 in all
> > > > instances.
> > > > Have anybody faced an issue as such?
> > > >
> > > > Kind Regards,
> > > > Devapriya De Silva
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Re: Strange behaviour of TRANSFORM function by Ook

Ook
Thu Aug 12 09:00:50 CDT 2004

If ALLTRIM( TRANSFORM( MyField )) truncates your data, there is something
wrong with your data. If you are working with memo fields, this is very
likely. Just yesterday I ran into yet another corrupted memo field, they ar
unfortunately all to common with VFP. Can you post a specific example of
data that gets truncated by this?


"Devapriya De Silva" <ddesilva@qa-software.com> wrote in message
news:%23gHexUDgEHA.3416@TK2MSFTNGP09.phx.gbl...
> Back to square one.
> This truncates my data in vfp7 sp1
>
> "Ook" <usenet@nospam.emberts.com> wrote in message
> news:OIW2Ax6fEHA.904@TK2MSFTNGP09.phx.gbl...
> > ALLTRIM( TRANSFORM( MyField ))
> >
> >
> > "Devapriya De Silva" <ddesilva@qa-software.com> wrote in message
> > news:esaPnf1fEHA.3932@TK2MSFTNGP09.phx.gbl...
> > > I cannot use alltrim as the field could be in anytype.
> > >
> > > Kind Regards,
> > > Devapriya De Silva
> > >
> > > "Ook" <usenet@nospam.emberts.com> wrote in message
> > > news:ua0UjUufEHA.592@TK2MSFTNGP11.phx.gbl...
> > > > I almost always use TRANSFORM(ALLTRIM( MyField )). It's more
reliable
> in
> > > > cases where you may have trailing spaces.
> > > >
> > > > What is in the memo field that you are working with?
> > > >
> > > > "Devapriya De Silva" <ddesilva@qa-software.com> wrote in message
> > > > news:%236wKVAtfEHA.3024@TK2MSFTNGP10.phx.gbl...
> > > > > Hi gurus,
> > > > >
> > > > > I am using VFP7 SP1.
> > > > >
> > > > > This result is correct:
> > > > > ?LEN(MyTable.MyMemoField)
> > > > > 558
> > > > >
> > > > > This result is incorrect:
> > > > > ?LEN(TRANSFORM(MyTable.MyMemoField))
> > > > > 256
> > > > >
> > > > > lcText = MyTable.MyMemoField
> > > > > ?LEN(TRANSFORM(lcText))
> > > > > 558
> > > > >
> > > > > If i try this in VFP 7 without the SP or in VFP 8, I get 558 in
all
> > > > > instances.
> > > > > Have anybody faced an issue as such?
> > > > >
> > > > > Kind Regards,
> > > > > Devapriya De Silva
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Re: Strange behaviour of TRANSFORM function by Devapriya

Devapriya
Fri Aug 13 01:41:37 CDT 2004

CREATE CURSOR temp (test M)
INSERT INTO temp VALUES (REPLICATE('x',500))

? LEN(TRANSFORM(test)) && returns 500 in VFP 7
? LEN(TRANSFORM(test)) && returns 500 in VFP 8
? LEN(TRANSFORM(test)) && returns 256 in VFP 7 SP1

Kind Regards,
Devapriya De Silva

"Ook" <usenet@nospam.emberts.com> wrote in message
news:%23fCcGTHgEHA.556@tk2msftngp13.phx.gbl...
> If ALLTRIM( TRANSFORM( MyField )) truncates your data, there is something
> wrong with your data. If you are working with memo fields, this is very
> likely. Just yesterday I ran into yet another corrupted memo field, they
ar
> unfortunately all to common with VFP. Can you post a specific example of
> data that gets truncated by this?
>
>
> "Devapriya De Silva" <ddesilva@qa-software.com> wrote in message
> news:%23gHexUDgEHA.3416@TK2MSFTNGP09.phx.gbl...
> > Back to square one.
> > This truncates my data in vfp7 sp1
> >
> > "Ook" <usenet@nospam.emberts.com> wrote in message
> > news:OIW2Ax6fEHA.904@TK2MSFTNGP09.phx.gbl...
> > > ALLTRIM( TRANSFORM( MyField ))
> > >
> > >
> > > "Devapriya De Silva" <ddesilva@qa-software.com> wrote in message
> > > news:esaPnf1fEHA.3932@TK2MSFTNGP09.phx.gbl...
> > > > I cannot use alltrim as the field could be in anytype.
> > > >
> > > > Kind Regards,
> > > > Devapriya De Silva
> > > >
> > > > "Ook" <usenet@nospam.emberts.com> wrote in message
> > > > news:ua0UjUufEHA.592@TK2MSFTNGP11.phx.gbl...
> > > > > I almost always use TRANSFORM(ALLTRIM( MyField )). It's more
> reliable
> > in
> > > > > cases where you may have trailing spaces.
> > > > >
> > > > > What is in the memo field that you are working with?
> > > > >
> > > > > "Devapriya De Silva" <ddesilva@qa-software.com> wrote in message
> > > > > news:%236wKVAtfEHA.3024@TK2MSFTNGP10.phx.gbl...
> > > > > > Hi gurus,
> > > > > >
> > > > > > I am using VFP7 SP1.
> > > > > >
> > > > > > This result is correct:
> > > > > > ?LEN(MyTable.MyMemoField)
> > > > > > 558
> > > > > >
> > > > > > This result is incorrect:
> > > > > > ?LEN(TRANSFORM(MyTable.MyMemoField))
> > > > > > 256
> > > > > >
> > > > > > lcText = MyTable.MyMemoField
> > > > > > ?LEN(TRANSFORM(lcText))
> > > > > > 558
> > > > > >
> > > > > > If i try this in VFP 7 without the SP or in VFP 8, I get 558 in
> all
> > > > > > instances.
> > > > > > Have anybody faced an issue as such?
> > > > > >
> > > > > > Kind Regards,
> > > > > > Devapriya De Silva
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>