Does anyone remember using Update Objects with TBDEDataSet ( Bde.DBTables.TBDEDataSet.UpdateObject - RAD Studio API Documentation ) and know what it is called in FireDAC, ADO, IBExpress, NexusDB, UniDAC … I am interested in anything implemented in a current database access layer that fully supports Delphi 11.
Hi There,
As far as I can see lots of things do the core stuff indicated in that document.
Example firedac fdquery
Can select, update, insert, delete.
Something like
qry.sql.text := 'select * from mytable where somecriteria';
qry.Open;
if not qry.EOF then
begin
qry.update;
qry.fieldbyname('somefield').AsString := 'sometext';
qry.post;
end
else
begin
qry.append;
qry.fieldbyname('somefield').AsString := 'other text';
... other necessary fields.
qry.post;
end;
Pretty sure they behave well with clientdatasets (and definitely fdMemTables)
Actual Update statements are still handy when you want to lock a record.
Need to take a little care with the options you choose. (Check All fields vs only key fields for updates)
I am curious whether this functionality got into other third-party packages. If anyone is using UpdateObject with something other than FireDAC, just a quick comment to confirm which Delphi you are using it in would be appreciated.