Page 1 of 1
Trimmed string param bug
Posted: Thu 15 Apr 2021 08:07
by Romano
Hi,
SDAC 9.4.3
Bug a string parameter getting trimmed is fixed
Can you describe some scenario of this bug please? I need to know how it can affect our customers.
Thanks
Roman
Re: Trimmed string param bug
Posted: Thu 15 Jul 2021 12:05
by Stellar
Hi Roman,
The loss of the string value part occurred when storing a Unicode string in a VARCHAR field in the database, for instance:
Code: Select all
CREATE TABLE T1 (
[fid] [int] NOT NULL,
[fname] [varchar](50) NULL)
Code: Select all
MSQuery1.SQL.Text := 'INSERT INTO t1 ( fid, fname ) VALUES ( :fid, :fname )' ;
MSQuery1.Params[0].ParamType := ptInput;
MSQuery1.Params[0].DataType := ftInteger;
MSQuery1.Params[1].ParamType := ptInput;
MSQuery1.Params[1].dataType := ftWideString;
MSQuery1.Prepare;
MSQuery1.Params[0].AsInteger := 1;
MSQuery1.Params[1].AsWideString := '121222';
MSQuery1.Execute;
Regards,
Sergey