table not in edit mode. Delphi

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
marsheng
Posts: 62
Joined: Thu 10 May 2012 10:51

table not in edit mode. Delphi

Post by marsheng » Thu 18 Jun 2015 13:07

Delphi _ In the past, I have entered a child form for the editing data. On entering the form I put the table into edit mode and on closing the form, I post the data. This has always worked fine.

I have a new program constraint and I now have 2 tables opened in the child form.

I put both tables into edit mode, and then when I close the form I get "not in edit mode" when returning to the calling program. PS I do not move from the currently selected records.

Code: Select all

procedure TfMain.dbgMasterDblClick(Sender: TObject);
begin
   fMembers.ShowModal;
Error ------------> end;
Even if I I use the following code I get the same error.

Code: Select all

procedure TfMembers.FormClose(Sender: TObject; var Action: TCloseAction);
begin

  dm.tblMaster.Post;
  dm.tblMembersMast.Post;
  dm.tblMaster.Edit;
  dm.tblMembersMast.Edit;
 end;
The only way to not have an error is to not use a post at all. What or how do I find out what is going wrong?

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: table not in edit mode. Delphi

Post by ViktorV » Fri 19 Jun 2015 08:23

For investigation of the issue, please compose a small sample demonstrating the problem and send it to viktorv*devart*com, including scripts for creating database objects.

Post Reply