UpdateBatch Problem

From: winsoft (winsoft_at_sby.dnet.net.id)
Date: 10/09/03


Date: Thu, 9 Oct 2003 15:58:03 +0700

I've problem with updatebatch while RollBackTrans issued.
I'm using TADOQuery with CursorLoc = Client, CursorType = Static, LocType =
BatchOptimistic.

Lets say that I just input 3 new data into TADOQuery, but one of the data is
not valid (ex : stock is not enough, etc).
Then I Save the data using the following procedure :

    ADOConnection.BeginTrans;
    Try
       ADOQuery.UpdateBatch();
       ADOConnection.CommitTrans;
   Except
       ADOConnection.RollBackTrans;
   End;

And the error exception is raised, so I have to fix the invalid data and try
to save the data again using the procedure above.
The question is : After saving the data, why not all data are save to the
database, but just only one data.
(I'm using SQL Server 2000)

Thanks for your help.