Subject Re: [IBO] 'Transaction has pending changes'
Author Helen Borrie
At 01:48 PM 23-10-02 +0930, you wrote:
>In the Contact demo, making changes to more than one record and then
>clicking on the
>ApplyUpdates button brings up a message 'Transaction has pending changes',
>even though I
>had already posted the changes for each record.
>
>What is the different between Post and ApplyUpdates?

Post applies the changes to the current row of a live
dataset; ApplyUpdates applies the changes that have been done to a cached
dataset since the last time ApplyUpdates was called. Are you using
CachedUpdates?


>Why doesn't ApplyUpdates apply updates to all changes in the table passed
>as a parameter
>to the transaction?

Not sure what the question means. A table isn't passed as a parameter to
the transaction. A transaction gets its parameters when it is started. At
that point, it doesn't know about any tables that are going to be in its
purview. A table identifier will appear in the "FROM" clause of the SQL
statement that the client passes to the server in the update request, but
it isn't an attribute of a transaction.

If you have CachedUpdates active, there are two ApplyUpdates calls
available: one for the dataset, the other for the transaction. If you
call the transaction's ApplyUpdates method, you can pass a list of cached
datasets in the call to specify a particular order of processing them. An
empty set causes the transaction just to iterate through the cached
datasets in no particular order.

The transaction's ApplyUpdates method also causes a commit. A dataset's
ApplyUpdates does not.

Helen