Board index » delphi » WideString data field, and data aware edits to handle them

WideString data field, and data aware edits to handle them

how to create a unicode fields under interbase that supports delphi
s Widestrings, i know that interbase gives UNICODE_FSS but it uses 3
bytes per char (unlike widestrings that uses two).

and how to access those fields under delphi using data aware components?
the data aware components that come with delphi does not support
widestrings and uses strings as any typed text

thanks in advance

LR

 

Re:WideString data field, and data aware edits to handle them


In article <3D4D3DE9.3020...@hotmail.com>, loner...@hotmail.com says...
Quote
> how to create a unicode fields under interbase that supports delphi
> s Widestrings, i know that interbase gives UNICODE_FSS but it uses 3
> bytes per char (unlike widestrings that uses two).

> and how to access those fields under delphi using data aware components?
> the data aware components that come with delphi does not support
> widestrings and uses strings as any typed text

        One option would be to subclass the data-aware controls and
convert the Unicode to WideStrings.  You can probably find the tools you
need here:

http://www.delphi-unicode.net/

        HTH,

        -Craig

--
 Craig Stuntz (TeamB) Vertex Systems Corp. Columbus, OH
     Delphi/InterBase WebLog: http://delphi.weblogs.com
     InterBase PLANalyzer (Free IB optimization tool):
          http://delphi.weblogs.com/IBPLANalyzer

Re:WideString data field, and data aware edits to handle them


In article <3D5A6C3F.4080...@hotmail.com>, loner...@hotmail.com says...

Quote
> hi again,
> i've been traviling this week, sorry,

> as for CHARACTER SET OCTETS, can i use SQL search querys with it?

        It should work with a parameterized query, anyway.

Quote
> for example if i got a record with a Widestring('I Live in CA')
> will it be found with a query (SELECT * FROM Table WHERE Field LIKE '%CA')

        I don't know how LIKE works with octets.  It should work, but I've
never tried it.

        -Craig

--
 Craig Stuntz [TeamB] Vertex Systems Corp. Columbus, OH
     Delphi/InterBase Weblog: http://delphi.weblogs.com
     InterBase PLANalyzer (Free IB optimization tool):
          http://delphi.weblogs.com/IBPLANalyzer

Re:WideString data field, and data aware edits to handle them


thanx, guess that i found something to do this weekend evening
Quote
Craig Stuntz [TeamB] wrote:
> In article <3D5A6C3F.4080...@hotmail.com>, loner...@hotmail.com says...

>>hi again,
>>i've been traviling this week, sorry,

>>as for CHARACTER SET OCTETS, can i use SQL search querys with it?

>    It should work with a parameterized query, anyway.

>>for example if i got a record with a Widestring('I Live in CA')
>>will it be found with a query (SELECT * FROM Table WHERE Field LIKE '%CA')

>    I don't know how LIKE works with octets.  It should work, but I've
> never tried it.

>    -Craig

Re:WideString data field, and data aware edits to handle them


In article <3D5BB153.8040...@hotmail.com>, loner...@hotmail.com says...

Quote
> since it is week end now, i tried making an OCTETS field, but in delphi
> it still treats it as a 1 byte string, widestring date wont store there,
>     maybe converting the data into widestring (converting two bytes into
> one widechar) when reading from the table and then store each widechar
> of the widestring as two characters will do the job, but this will cost
> subclassing new data-aware components!

        Yes; I warned you about this.

Quote
> maybe this will do the job, but are there any other easier way?

        Use Unicode and relax about having the extra byte.  You can't
afford to be miserly about disk space if you want decent DB performance.

        -Craig

--
 Craig Stuntz [TeamB] Vertex Systems Corp. Columbus, OH
     Delphi/InterBase Weblog: http://delphi.weblogs.com
     InterBase PLANalyzer (Free IB optimization tool):
          http://delphi.weblogs.com/IBPLANalyzer

Other Threads