Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 14 of 14 total
Thread Getting the first line of ftWideMemo field in a Unicode database
Thu, Feb 13 2014 9:17 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Barry,

<< If you read my previous message, then you shouldn't have to use
TWideMemoFields if XE is set to Unicode. Only if you are using an ANSI
environment, do you need to specify "WIde" because with Unicode everything
is be wide by default.

Once you get XE to use Unicode as the default, you really only need to use
the common String or TMemoField because they are already wide.  >>

Not correct.  TStringField,TMemoField=AnsiString no matter what version of
Delphi you're using.  It's done this way so as to not break existing
applications.

Tim Young
Elevate Software
www.elevatesoft.com
Thu, Feb 13 2014 3:42 PMPermanent Link

Jeff Cook

Aspect Systems Ltd

Avatar

<Barry> wrote in message
news:EE6491A5-8F16-455D-B9E9-24DF300D8A2D@news.elevatesoft.com...
> "Jeff Cook" wrote:
>
>var s: string;
> OR
> var s:AnsiString:< ????
>
> Why are you using AnsiString (8 bit characters) when you are using EDB
> Unicode which is 16 bit character? I assume you are using the Unicode
> version of ElevateDb because your collation is  "UNI".
>
Hi Barry

It was just an experiment - just to show everyone in the newsgroup that I
might be ignorant but am prepared to try anything with just the teeniest
chance of working before I post on here.  Wink

As previously posted, I had changed all my BlobTypes to ftWideMemo but
neglected to change change TMemoField to TWideMemoFiled.

Cheers

Jeff

--
Jeff Cook
Aspect Systems Ltd
www.aspect.co.nz

Fri, Feb 14 2014 12:07 AMPermanent Link

Barry

Jeff,

>It was just an experiment - just to show everyone in the newsgroup that I
might be ignorant but am prepared to try anything with just the teeniest
chance of working before I post on here.  Wink

As previously posted, I had changed all my BlobTypes to ftWideMemo but
neglected to change change TMemoField to TWideMemoFiled.
<

Yes, Tim is correct. When referencing a Unicode dataset string field it must always be a TWideMemoField or TWideStringField etc..  

But the Delphi string variables are still defined as:

   var CustName: String;   //Use this. Handles both Unicode or ANSI strings and is the default type for strings

even for Unicode because the XE compiler has String defined as:

  Type String = UnicodeString;

So you don't have to worry about declaring string variables as:

   var CustName: WideString;  //Not necessary unless you are using COM
or
   var CustName: UnicodeString;  //Not necessary because this is what String is typed to

I hope I haven't confused you further.  Smile

Barry
Sun, Feb 16 2014 3:31 PMPermanent Link

Jeff Cook

Aspect Systems Ltd

Avatar

<Barry> wrote in message
news:3A2CA42F-3C41-434F-8945-40620A4972CC@news.elevatesoft.com...
>
> I hope I haven't confused you further.  Smile
>
Barry

I have always considered that confusion is a natural state Wink

Cheers

Jeff

--
Jeff Cook
Aspect Systems Ltd
www.aspect.co.nz

« Previous PagePage 2 of 2
Jump to Page:  1 2
Image