Reputation: 41
I can not update rows in the database with the following instructions:
fdquery1.Edit;
fdquery1.fieldByName('prova').AsString := 'asdasd';
fdquery1.Open;
Why? i must use another property of TFDQuery for changes to take effect
Upvotes: 2
Views: 1875
Reputation: 19106
After TDataSet.Edit
you must call TDataSet.Post
to persist the changed values.
fdquery1.Edit;
fdquery1.fieldByName('prova').AsString := 'asdasd';
fdquery1.Post;
The documentation also has a sample for that
BTW: I am not sure why you want to open the dataset again?
Upvotes: 6