> Message: 8 >> Date: Thu, 9 Feb 2012 10:50:56 -0600 >> From: Ed Leafe <e...@leafe.com> >> On Feb 9, 2012, at 10:28 AM, Vineet Deodhar wrote: >> >> > To make my question more clear, pl. consider the vfp cursor adapter. >> > In the cursors added to data-environment, records are either updated or >> > marked for deletion or appended. >> > At the end, with just a single call, it takes care of the CRUD functions >> > automatically. >> > >> > Whether such behaviour like vfp CA is possible here? >> >> Dabo works the same with one exception: deleting a record happens >> immediately, whereas the other changes (append/update) are buffered. Those >> changes exist in the local cursor's data, and when you call save(), they >> are all written to the backend. Likewise, you can call cancel() to revert >> those changes at any time before writing them with the save() call. >> >>
Digging-up an old thread again :) I notice one difference between vfp CA & dabo: Pl. do not think that I am showing-off shortcomings of dabo. But I am trying to think how it can be made to suit my purpose. Agreed that append & update are buffered. But a single save() call would not be sufficient to save them at single shot As we all know, -- For handling the save of 'appended' records, we need to call new() first. (no need for seek() & setFieldVal() ) -- For handling the save of 'updated' records, seek() & setFieldVal() are required (of course). -- For delete, seek() & delete() are required. In vfp CA, no such extra work is necessary. I am just wondering how this whole stuff can be achieved in dabo. Thinking of adding flags to the records (dicts) for append/update/delete. But not sure how to proceed Any thoughts? If you need buffered deletes, you will need to add a column to the >> cursor's data that works like the VFP delete() flag. Then, in your >> afterSave() code, find all the records with that flag set, and call >> delete() on them. >> >> >> -- Ed Leafe > > For deletes, yes. It is simple. But as I have written before, I am thinking of how to make dabo understand whether to append/update/delete. --- Vineet --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- _______________________________________________ Post Messages to: Dabo-users@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/CAP5=7opj+xikf4ddf0daqtko5-y4ekxc5pen7tec+jiz4dq...@mail.gmail.com