Page 1 of 1

Problem with Append method

Posted: Tue 15 Oct 2013 08:37
by krshin
Hello,

I have one small problem with Append method on TUniQuery, when I call

UniQuery1.Append;
DBEditName.SetFocus;

it cancel my Append method, but if I call SetFocus on a component before Append method all works fine, also it works fine if my cursor is positioned on last record!

very strange...

Re: Problem with Append method

Posted: Tue 15 Oct 2013 09:32
by AlexP
Hello,

We cannot reproduce the problem, please specify the IDE version, as well as visual components attached to this UniQuery

Re: Problem with Append method

Posted: Tue 15 Oct 2013 14:42
by krshin
Hello Alex,

Here is complete scenario:

Code: Select all

procedure TfProductUnitMeasure.bNewClick(Sender: TObject);
begin
  try
    if dm.qUnitMeasure.State in [dsEdit, dsInsert] then
      Exit;
    eIdent.SetFocus;    // if use this line all works fine
    dm.qUnitMeasure.ReadOnly := False;
    dm.qUnitMeasure.Append;
    // eIdent.SetFocus; // if this line is uncommented I have problem
  except
    //on msdError: Exception do SomeException
  end;
end;
RAD Studio XE2, DevExpress DBEdit Components attached to dm.qUnitMeasure

I hope that, this will help you.

Re: Problem with Append method

Posted: Wed 16 Oct 2013 09:02
by AlexP
Hello,

We don't test our products with 3rd-party data display visual components. Please try reproducing the problem on the Data Controls standard components (for example, TDBEdit), and let us know the result.

Re: Problem with Append method

Posted: Wed 16 Oct 2013 09:33
by krshin
Hello AlexP,

When I use standard DB components all works same as before, but when I create new form without any other DB control except DBEdit and DBMemo all works fine.
When I scan all events, in my case when I call Append method, on focusing DBEdit control it call Cancel method on my DataSet.
DevArt works fine, and I must find problem :shock: