Author: John Fabiani
Posted: 2012-02-15 at 10:26:56
On Wednesday, February 15, 2012 03:49:36 PM Vineet Deodhar wrote:
> > Message: 8
> >
> >> Date: Thu, 9 Feb 2012 10:50:56 -0600
> >> From: Ed Leafe <ed@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?
What you say is true in general (that assumes I understood everything in your
post). VFP CA's were something like a "do all interface to general data".
But try using joins, or special sub-selects within the CA. I don't believe
you can then use many of the speical features. Everything is tied to a cursor
in an update sort of way. Which means that stored procedures outside of the
cursor did not work. So back in the day when I used VFP I reverted back to
SPT to access MsSQL.
CA's were useful to a point - but in the end I had to abandon them to get the
job done. They worked well when the solution was simple.
That is not to say that Dabo is perfect. I'd like a class that some how did
not immediately delete the data when the delete button was clicked. In fact I
normally do not allow an actual delete to take place. I normally have a field
(active type bool) that I use to simulate deletes.
I'm biased because what has to be done in Dabo is exactly what I had to do in
VFP.
Johnf
_______________________________________________
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/6017148.ULYoYzUNlQ@linux-12