Last character clipped off after using TSQLQuery to update Memo
Posted: Thu 20 Sep 2007 13:28
I don't know if this is a Core Lab issue but since I applied Update 3 to my Delphi 2007 for win32 I experience this problem for MS SQL and Oracle (which I connect to using CoreLab drivers) but not for Interbase which I use Borland's driver.
create a little table with a TEXT column
The in Delphi, a simple update query eg.:
Run it, click the button, go to the table and you find "Hell". Very appropriate. This is happening for TSQLQuery - TDataSetProvider - ClientDataSet - TDataSource - TDBMemo chain as well. Just applyupdates after editing the TDBMemo, refresh and I see that last character disappear.
Does anyone else get this? I'm sure this was working before D2007 Update 3 came along which is why I'm unsure who to raise it as an issue with.
Anyway, in hope, Regards Chris
create a little table with a TEXT column
Code: Select all
CREATE TABLE TESTD2007UPD3 (
ID VARCHAR(1) NOT NULL,
NOTES TEXT NULL)
GO
INSERT INTO TESTD2007UPD3 VALUES ('X', NULL)
GO
Code: Select all
procedure TForm2.Button3Click(Sender: TObject);
var
SQLQuery2 : TSQLQuery;
begin
SQLQuery2 := TSQLQuery.Create(nil);
try
SQLQuery2.SQLConnection := conMSSQL;
SQLQuery2.SQL.Add('UPDATE TESTD2007UPD3 SET NOTES=:NOTES');
SQLQuery2.Params[0].AsMemo := 'Hello';
SQLQuery2.ExecSQL;
finally
SQLQuery2.free;
end;
end;
Run it, click the button, go to the table and you find "Hell". Very appropriate. This is happening for TSQLQuery - TDataSetProvider - ClientDataSet - TDataSource - TDBMemo chain as well. Just applyupdates after editing the TDBMemo, refresh and I see that last character disappear.
Does anyone else get this? I'm sure this was working before D2007 Update 3 came along which is why I'm unsure who to raise it as an issue with.
Anyway, in hope, Regards Chris