Change value BeforeUpdateExecute

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 3
Joined: Mon 16 Jan 2006 23:41

Change value BeforeUpdateExecute

Post by » Tue 27 Feb 2007 11:49


I want to alter some field-values before the update of the query occurs.

Code: Select all

procedure TDataModule1.q_anredeBeforeUpdateExecute(
  Sender: TCustomMSDataSet; StatementTypes: TStatementTypes;
  Params: TMSParams);
  Sender.FieldByName('myfield').Text := 'test';
But this doesn't work. Is this the correct way to solve this or how is this done?

Posts: 512
Joined: Thu 26 Jan 2006 10:06

Post by Jackson » Tue 27 Feb 2007 13:56

The TCustomDADataSet.BeforeUpdateExecute event is not designed for such tasks.
Use the TDataSet.BeforePost event instead.

Post Reply