Delphi update error cannot perform this operation on closed dataset..

September 14, 2008

Adding record is called inside opened transaction. There are problems with
using this method in multiāˆ’user mode. When execution point of one
application instance is set after Post but before the transaction is
commited, calling this method from other instance of application raises such
exception: ‘Could not update; currently locked.’.
ADOConnection1.BeginTrans;
ADODataSet1.Open; // THIS <<<<<!!
ADODataSet1.Append;
ADODataSet1['id'] := some_id;
ADODataSet1.Post;
ADODataSet1.Close;
//… Others Commands
ADOConnection1.CommitTrans;

open dataset first to update..

kegagalan dalam update dataset dalam delphi karena dataset belum dibuka

error cannot perform this operation on closed dataset..

ADODataSet1.Open;