Problem with Append method

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
krshin
Posts: 14
Joined: Wed 21 Mar 2007 11:29

Problem with Append method

Post by krshin » Tue 15 Oct 2013 08:37

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

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Problem with Append method

Post by AlexP » Tue 15 Oct 2013 09:32

Hello,

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

krshin
Posts: 14
Joined: Wed 21 Mar 2007 11:29

Re: Problem with Append method

Post by krshin » Tue 15 Oct 2013 14:42

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.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Problem with Append method

Post by AlexP » Wed 16 Oct 2013 09:02

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.

krshin
Posts: 14
Joined: Wed 21 Mar 2007 11:29

Re: Problem with Append method

Post by krshin » Wed 16 Oct 2013 09:33

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:

Post Reply