0

Hey guys good morning,

i got a DBGrid and the UniDac components. I a use a popupmenu and select a row. I fill via the onclick event from the popupmenu a new form with my data in my TEdit.

Now the problem is, that i want to edit my data which i selected from the dbgrid.

This code works until dbgrid is refreshed and then the old values are back again in my dbgrid. How can i change it for the mysql table too not only for the dbgrid?

My actually Code:

   FQuery.Edit;
   FQuery.FieldByName('CfgUID').AsString := Edit4.Text;
   FQuery.FieldByName('CfgMod').AsString := Edit1.Text;
   FQuery.Post;
3
  • did you committed transaction after post ? does you query have unique index for rows ? what they reply to you on official forum? forums.devart.com/viewforum.php?f=7 Commented Apr 23, 2013 at 9:38
  • I didnt comitted...And i have a unique index for rows, Whats the command for the commit? Commented Apr 23, 2013 at 9:44
  • i don't have UniDAC but read their help about transactions. Transactions are core SQL concepts and you should read at very least wikipedia extract about them. Then, if your table has unique index, it does not necessarily mean your query has it as well, nor that UniDAC knows about that. DevArt have very responsive support team, so just ask on the forums, there can be many reasons and they know in details how to spot it.. Commented Apr 23, 2013 at 9:55

1 Answer 1

1

The solution was to disable CachedUpdates or call ApplyUpdates after Post.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.