user3737012
user3737012

Reputation: 41

Delphi Firedac Update don't apply modified

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

Answers (1)

Sir Rufo
Sir Rufo

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

Related Questions