Dave

Is this and ADO ClientDataSet?
If so there is an informal fix out for this - the closing the cloned
record/dataset caused the original to close

BTW this is how TADODataset implements 'locate'

HTH
Neven


----- Original Message -----
From: David Brennan <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Tuesday, 21 November 2000 17:11
Subject: [DUG]: Problems with CloneCursor


> I have a ClientDataset (let's called it cdsPayments) which the user is
> entering a list of records (payments) into. Sometimes while they are
> entering these payments the user will want to bring up a Find/List screen.
> This Find screen queries data related to payments and must exclude some
> records based on the ones the user has already entered.
>
> So I need a way of checking the records in cdsPayments without disturbing
> it's state (for example the user might be halfway through entering a new
> payment - I can't cancel or post this record for them). Obviously I can't
> directly use cdsPayments because I can't scroll it while it is potentially
> in edit mode. Similarly I don't want to maintain a seperate list of
payment
> details in a TList etc unless as a last resort.
>
> One solution which seemed promising was to use CloneCursor. This allows
> another clientdataset to have another cursor into the same data as
> cdsPayments. It works brilliantly - the Find form displays the correct
> details, cdsPayments remains in edit mode, destroying the Find screen and
> associated cloned cursor client dataset doesn't cause any problems etc.
>
> However from that point on running the command cdsPayments.Delete will
cause
> the cdsPayments to decide it is empty (EOF and BOF - although it still
> thinks it's record count is correct). I have tested a simpler case and it
> definitely seems to be triggered by calling CloneCursor.
>
> Has anyone had similar problems? How did you solve them? Or maybe someone
> has done similar things and not had any such problems? Either way I would
be
> interested to hear.
>
> Thanks,
> David Brennan
> DB Solutions Ltd.
>
>
>
>
> --------------------------------------------------------------------------
-
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
>

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to