TStringField in delphi 2009

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
cybsistemas
Posts: 118
Joined: Mon 12 Sep 2005 17:31
Location: Argentina

TStringField in delphi 2009

Post by cybsistemas » Wed 08 Oct 2008 21:12

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.

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Tue 14 Oct 2008 08:14

It is assumed that the TStringFields holds AnsiStrings, so the Value property has AnsiString type.

Post Reply