Hi guys,

I am feeding a table from a SQL query into a structure and now trying to delete/copy a given row but I am getting an error executing the sql query.

This is the table with the delete link taking in the ID:

And this is the action to delete using the sql statement.


Any idea?


Kind regards,

Salim

Hi Salim,

You didn't mention what error you are getting. So no, I don't have any idea.

Kilian Hekhuis wrote:

Hi Salim,

You didn't mention what error you are getting. So no, I don't have any idea.


Hi Kilian,


Apologies, the screenshot of the error is below when clicking on the delete:


Solution

That's just the generic error. Did you check Service Center to find the actual error?

Solution

Kilian Hekhuis wrote:

That's just the generic error. Did you check Service Center to find the actual error?

Foreign Key restraint I am now deleting the children before the actual role. What do you think of the cascade delete rule being changed is that better of than cycling through child records and deleting manually?


Cascading delete may be slower than a DELETE SQL statement that deletes all child records at once. Using an Aggregate + For Each + Entity delete is definitely slower than all of these. Since you are already using a DELETE in a SQL, I'd add a DELETE to delete the child records as well.