Unidac serious bug in Delphi2009

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
coolzew
Posts: 10
Joined: Sun 17 Apr 2005 04:04

Unidac serious bug in Delphi2009

Post by coolzew » Sat 22 Nov 2008 12:53

Hi, Developer,

Do you know there is a the difference in Delphi2009: TField.AsString and TField.Value,
I tested it and Result is :
----------------------------------------------------
function TStringField.GetAsString: string;
begin
Result := string(GetAsAnsiString);
end;
----------------------------------------------------
----------------------------------------------------
function TStringField.GetAsVariant: Variant;
var S: AnsiString;
begin
if GetValue(S) then Result := S
else Result := Null;
end;
----------------------------------------------------
So ,you know VarType(TField.Value) = 256 VarType(TField.AsString) = 258,
Please check your code which prepare Params before execute sql.
When I run in delphi2009, then Param Size is not enough,
now is : "中国" size is varchar(2),
to tell your the truth the size is varchar(4)

I am looking forward to hearing from you.
Thank you in advance.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Mon 24 Nov 2008 08:23

Please describe what is the problem that occurs in your application. Which provider (Oracle, InterBase, etc.) are you using?

coolzew
Posts: 10
Joined: Sun 17 Apr 2005 04:04

Post by coolzew » Mon 24 Nov 2008 13:11

Step1.
create a table in MS SQL SERVER:
Create table tblDEMO ( AField varchar(10))

Step2.
Under Delphi2009, Use TUniQuery to Open this table tblDEMO,
Data Control use DBGrid.

Step3.
In DBGrid, append a record enter value '中国', then post it.

Step4
Refresh or reopen the table tblDemp, Only '中' stored.

My OS (XP) lauguage is simplify-chinese .

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Wed 26 Nov 2008 11:59

Thank you for information. We have reproduced this problem and fixed it. This fix will be included in the next UniDAC build.

Post Reply