Write 'AAA' but get 'A'

Help
Anonymous
2013-03-27
2013-05-01
  • Anonymous - 2013-03-27

    My table have a NVARCHAR fields
    I used code, below

    with ClientDataSet1 do
    begin
      Append;
      FieldByName('FieldTest').AsString := 'AAA';
      Pose;
      ApplyUpdate(0);
    end;
    

    But!
    I used SQL: select FieldTest from TEST
    I get 'A', only 1 char…

    Why???
    Delphi 2009/XE
    Windows 2000/XP
    SQL Server 2000

     
  • Anonymous - 2013-03-27

    Ohh…
    Because my field type is "VARCHAR".
    Modify "VARCHAR" to "NVARCHAR" is OK.

     

Log in to post a comment.