Groups | Blog | Home
all groups > flash data integration > december 2004 >

flash data integration : How to tell when applyUpdates has committed changes


Guidon The Bee
12/15/2004 4:15:14 PM
I've got an editable dataset which is bound to an RDBMS Resolver, which is in
turn bound to an XML Connector. Clicking on a 'Save' button calls an
..applyUpdates(); function on the dataset & all this works fine :D

However, I need to detect when these updates have been committed to the
underlying database (currently access). I have a tree component which I need to
update with the new data from the dataset. If I update the Tree component
source immediately, I get the old data (Presumably because the data hasn't been
committed to the database yet). I think I need something more like the
resolveDelta event, but that doesn't fire if there are no messages from the
server

Can anyone point me in the right direction ?
derobinson
12/15/2004 5:22:37 PM
You need to bind the dataset to a resolver, applyUpdates, set your connector
params to the resolved delta set, then pass the delta back to the server where
your app writes it to the db. Something like this:

myDataSet.applyUpdates();
myConnector.params = {deltaData:myResolver.updatePacket};
myConnector.trigger();

Then you can re-query the db and repopulate your tree.

Hope that helps!

Pilipo
12/16/2004 3:44:59 PM
Just trap the RDBMSResolver.reconcileResults event. This event fires whenever
the results are received back from the connector and are about to be passed
back to the dataset. When this event fires, you can be sure your database
update has already occured. Good Luck!
Guidon The Bee
12/20/2004 3:14:42 PM
Thats excellent, thanks for your help !!

AddThis Social Bookmark Button