Page 1 of 1

TStringField in delphi 2009

Posted: Wed 08 Oct 2008 21:12
by cybsistemas
In 5.70 Beta for Delphi 2009

Client : TmyTable;
ClientName : TStringField;
xxxValue : String;

ClientName.Value := xxvalue //(ClientName.Value is AnsiString)

[DCC Warning] Udm1.pas(903): W1058 Implicit string cast with potential data loss from 'string' to 'AnsiString'

ClientName.AsString := xxvalue //(ClientName.AsString is String)

No Warning message

ClientName.Value Should be String, no AnsiString.

Posted: Tue 14 Oct 2008 08:14
by Challenger
It is assumed that the TStringFields holds AnsiStrings, so the Value property has AnsiString type.