in xe6

in xe6,
i use the clientdataset for DELETE the records in sql .....
i'm getting error (dataset not in a edit or insert mode).

code :(client dataset -cds)

with CDS do
      Begin
         CDS.Close;
         CDS.Open;
         CDS.First;
       if  CDS.FieldByName('ImgId').AsString = SgPrm.Cells[0,SgPrm.Row] then
          CDS.Delete;
          CDS.Post;
         CDS.Prior;
         CDS.ApplyUpdates(0);

Comments

  1. Manin André
    hai  andre

    i use remove cds but it is not declare ....
    how can i use that command..

    ReplyDelete
  2. The error is from your call to CDS.Post. Please remove that call.

    ReplyDelete

Post a Comment