Board index » delphi » How to get WideString type data value from Field

How to get WideString type data value from Field


2006-07-08 01:40:49 AM
delphi264
How to get WideString type data value from Field?
because Field->AsString will make the data currpt for different OS
How can I get the orginal Data by WideString?
 
 

Re:How to get WideString type data value from Field

"Emmanuel" <XXXX@XXXXX.COM>writes:
Quote
How to get WideString type data value from Field?
because Field->AsString will make the data currpt for different OS
How can I get the orginal Data by WideString?
From the help : DevGuide Developing database applications
Converting field values:
A TWideStringField will correctly convert using AsVariant,
AsString, AsInteger, AsFloat, AsCurrency, AsBCD, AsDateTime,
AsSQLTimeStamp, and AsBoolean.
Sounds like you haven't correctly defined the field.
~ JD
 

Re:How to get WideString type data value from Field

But I am auto create the field by New Field, And in the Interbase using
Varchar Unicode, How can I create TWideStringField ?
"JD" <XXXX@XXXXX.COM>写入消息新闻:44aff9d3$XXXX@XXXXX.COM...
Quote

"Emmanuel" <XXXX@XXXXX.COM>writes:
>How to get WideString type data value from Field?
>because Field->AsString will make the data currpt for different OS
>How can I get the orginal Data by WideString?

From the help : DevGuide Developing database applications
Converting field values:

A TWideStringField will correctly convert using AsVariant,
AsString, AsInteger, AsFloat, AsCurrency, AsBCD, AsDateTime,
AsSQLTimeStamp, and AsBoolean.

Sounds like you haven't correctly defined the field.

~ JD

 

Re:How to get WideString type data value from Field

I define the field is VARCHAR (30) CHARACTER SET UNICODE_FSS
COLLATE UNICODE_FSS
If I use TWideStringField , there is error : Type mismatch for field
Quote
From the help : DevGuide Developing database applications
Converting field values:

A TWideStringField will correctly convert using AsVariant,
AsString, AsInteger, AsFloat, AsCurrency, AsBCD, AsDateTime,
AsSQLTimeStamp, and AsBoolean.

Sounds like you haven't correctly defined the field.
 

Re:How to get WideString type data value from Field

I define the field is VARCHAR (30) CHARACTER SET UNICODE_FSS
COLLATE UNICODE_FSS
If I use TWideStringField , there is error : Type mismatch for field "XXX",
excpecting: WideString actual:String
"Emmanuel" <XXXX@XXXXX.COM>写入消息新闻:44b22084$XXXX@XXXXX.COM...
Quote
I define the field is VARCHAR (30) CHARACTER SET UNICODE_FSS
COLLATE UNICODE_FSS

If I use TWideStringField , there is error : Type mismatch for field


>From the help : DevGuide Developing database applications
>Converting field values:
>
>A TWideStringField will correctly convert using AsVariant,
>AsString, AsInteger, AsFloat, AsCurrency, AsBCD, AsDateTime,
>AsSQLTimeStamp, and AsBoolean.
>
>Sounds like you haven't correctly defined the field.


 

Re:How to get WideString type data value from Field

HELP ME
 

Re:How to get WideString type data value from Field

I searched the archives:
www.tamaracka.com/search.htm
and found a post by Jeff Overcash where says that IB doesn't
support widestrings (including WideStringField) but that was
from 2000. I appologize if I mislead you (works great with
ADO).
Other threads showed that individuals were indeed using
UNICODE_FSS successfully as a secondary character set
for individual fields (like you are doing).
If, for what ever reason, you can always resort to a blob but
that would most likely preclude you from using data-aware
components with that field.
~ JD
 

Re:How to get WideString type data value from Field

UNICODE_FSS cannot solve my problem
1.Unicode should let us can see the same data in different OS,but I found
that if I save simlpe Chinese Word or tradition chinese word to Interbase
using simple Chinese OS, then when the data read under tradition chinese OS,
all the chinese word changed to be irrecognizable.
2. for All Unciode Chinese word Stored in Interbase with UNICODE_FSS ,there
is no method get data as unicode, for example, after asString, all unicode
will change to ASCII Code
Quote
Other threads showed that individuals were indeed using
UNICODE_FSS successfully as a secondary character set
for individual fields (like you are doing).