I've got a TADODataSet set up as LockType ltBatchOptimistic, client-side
static cursor. I allow the user to pop a dialog to add records to data set
one by one. If the user adds one record, and then pops the dialog to add
another, but hits Cancel, all the records the user added are canceled - not
just the current one.
Is this a "feature" of ADO, or is it something gone haywire in ADOExpress?
Is there a simple workaround?
Thanks in advance...
-Eric Harmon
--
Karlheinz Spaeth
BTW: I'm currently enjoying your wonderful book "Delphi COM Programming".
I don't want to apply the updates at this point. I've got one record in the
batch, and the user starts to add another. He then cancels the second
record. I still want the first record to remain in the batch - I don't want
to write it to the database yet.
-Eric
"Karlheinz Spaeth" <cha...@staufen.net> wrote in message
news:8boc0r$n2...@bornews.borland.com...
I used the following settings:
Client Cursor
Table Direct Mode
CursorType Static
Locktype BatchOptimistic
Problably you didn't use a client cursor?
--
Karlheinz Spaeth
Yes, I did use a client cursor. I *didn't* use a table in table direct
mode, so I'll try it that way and see what happens.
-Eric
"Karlheinz Spaeth" <cha...@staufen.net> wrote in message
news:8boidn$ml...@bornews.borland.com...
Eric,
I had exactly the same situation. Fortunately I was using a component, that
was derived from TADOQuery, so I was able to override the InternalCancel
method. If you look at that method it says:
procedure TCustomADODataSet.InternalCancel;
begin
Recordset.CancelUpdate;
end;
So I replaced it with my version:
procedure TLocalQuery.InternalCancel;
begin
RecordSet.Cancel;
end;
Works perfect for me!
Thank you!
-Eric
"Mark Edington (Borland)" <medi...@nolunchmeat.com> wrote in message
news:38e5276a@dnews...
> Eric, see my reply to the other message on this thread. You need to
comment out
> the line of code in the InternalCancel method, it doesn't belong there.
>
> Mark
>
>