Delete a record

How can I delete a record using the XDataWebDataSet?

Ole

Calling Delete then ApplyUpdates should be enough.

I need to delete a specific record in a database table.

Delete from aTable where aField ='Somevalue';

Code sample please :slight_smile: I'm on "thin ice" here.

You "can't" (shouldn't) execute SQL statements directly from web clients. It's a serious security issue. You should invoke HTTP methods in your server and from the server you should execute the SQL Statements.

There must be a way to select a specific record in a table using the XDataWebDataSet?

And then delete the record using Delete and ApplyUdates via XDataWebDataSet?

Invoke HTTP methods in my Xdataserver is way beyond my knowledge, I need to do it using data components :neutral_face:

Is this correct and what about security using this method?

if xdatawebdataset1.FindField('aFieldName').AsString.Contains(WebEdit.text) then
begin
  xdatawebdataset1.Delete;
  xdatawebdataset1.ApplyUpdates;
end

Yes, that is correct.