I'm working through an example I found at:
Managing ColdFusion data with Adobe Flash Builder 4 beta
... and while I'm using a Delphi 2007 web service, it is mostly working fine for me. However, one thing in the article that doesn't work is where the author uses
... to update every record of a datagrid, and states
commit() function is a built-in function of the data service that will run the service that you defined as the update operation in the Data Management wizard. In this case, it is running the
updateItem() function once for each record in the DataGrid control.
In the service FB4b2 made for me, however, commit() doesn't seem to exist. I have defined an Update operation and it works fine when called separately. I'm wondering if I will just have to add code to loop through the datagrid and call the Update operation on each record. If so, is it possible to just have it update the records that have changed, rather than all of them?
Thanks for any suggestions ...
You will see commit() on the service instance only if you have enabled Data Management for one of its entities. Have you configured your UpdateOperation in the Datamanagement wizard for entity (http://www.adobe.com/devnet/flex/articles/fcf_managing_data_03.html)?
Thank you - you have led me to the problem. I had originally done "Enable Data Management", but I rewrote and reimported the web service. The web service operations that I had set up in code, including UPDATE, still worked fine, and I didn't realize that I had to do "Enable Data Management" again. It is, of course, obvious now :-)
Note that if I do a "Refresh" of the web service, commit() stays around - it is when I do a "Delete" (and reload) of the web service that it goes away.