Last character clipped off after using TSQLQuery to update Memo

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for SQL Server in Delphi and C++Builder
Post Reply
chrispaskins
Posts: 11
Joined: Tue 11 Oct 2005 10:32
Location: Windsor, UK

Last character clipped off after using TSQLQuery to update Memo

Post by chrispaskins » 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

Code: Select all

CREATE TABLE TESTD2007UPD3 (
  ID VARCHAR(1) NOT NULL,
  NOTES TEXT NULL)
GO

INSERT INTO TESTD2007UPD3 VALUES ('X', NULL)
GO
The in Delphi, a simple update query eg.:

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

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 21 Sep 2007 09:06

There are many incompatible changes for dbExpress in Update 3 for Delphi 2007. So, our drivers have to be modified correspondingly to support these changes in dbExpess. We do not recommend using the current version of DbxSda with Delphi 2007 Update 3. In the nearest time we will release the new build of the driver compatible with Delphi 2007 Update 3.

Post Reply