Subject | Update and IB_DSQL what am I doing wrong? |
---|---|
Author | Chuck Belanger |
Post date | 2007-11-26T23:36:41Z |
Hello:
Why doesn't the following work? By that I mean when I access the event
that has this code several times in succession, only the last UPDATE is
in the table. What happened to the other UPDATEs?
I have been using a variation of below for about 4 years now without
this recent problem. Sometimes I need UPDATERECORD to make the UPDATE
stick and sometimes IB_TRANSACTION.COMMIT. I never know which and it
turns out that one or the other will work, but not either in the cases
where this comes up.
Perhaps I'm just missing something?
Thanks for any help,
Chuck Belanger
with ModData.dsql_AnyUse do
begin
SQL.Clear;
Params.ClearBuffers(rsNone);
SQl.Add('UPDATE Filters SET Filter_in_ToolBar = 1 ');
SQL.Add('WHERE Filter_ID = :filterid');
Prepare;
ParamByName('FilterID').AsInteger := NodeData.ID;
Execute;
//UpdateRecord;
IB_Transaction.Commit;
end;
Why doesn't the following work? By that I mean when I access the event
that has this code several times in succession, only the last UPDATE is
in the table. What happened to the other UPDATEs?
I have been using a variation of below for about 4 years now without
this recent problem. Sometimes I need UPDATERECORD to make the UPDATE
stick and sometimes IB_TRANSACTION.COMMIT. I never know which and it
turns out that one or the other will work, but not either in the cases
where this comes up.
Perhaps I'm just missing something?
Thanks for any help,
Chuck Belanger
with ModData.dsql_AnyUse do
begin
SQL.Clear;
Params.ClearBuffers(rsNone);
SQl.Add('UPDATE Filters SET Filter_in_ToolBar = 1 ');
SQL.Add('WHERE Filter_ID = :filterid');
Prepare;
ParamByName('FilterID').AsInteger := NodeData.ID;
Execute;
//UpdateRecord;
IB_Transaction.Commit;
end;