The dataset is a TClientDataset which is getting it's data from a
TAdoStoredProc via a fairly standard provider (but updates etc aren't
applied by the provider).

I have tested a situation where the cloned dataset is kept open and in
existance - deleting still causes the dataset to think everything is gone.
However I have also found that calling Resync will appear the records to
reappear again (correctly minus the deleted record), although the cursor
position jumps back to the first record.

What was the informal fix you refered to? Simply not closing the cloned
dataset or is there a more tangible fix?

Thanks,
David.

----- Original Message -----
From: "Neven MacEwan" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Tuesday, November 21, 2000 5:14 PM
Subject: Re: [DUG]: Problems with CloneCursor


> 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"

---------------------------------------------------------------------------
    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