cancel
Showing results for 
Search instead for 
Did you mean: 

MSSQL Connector - Support Updating Rows in Tables that have Triggers

MSSQL Tables that have triggers on update/ insert currently fail when a PATCH or UPDATE/IF operation is applied.

 

UpdateIf( , Patch( :

MSSQL Error: The target table 'xxxxxxxx' of the DML statement cannot have any enabled triggers if the statement contains an OUTPUT clause without INTO clause.

 

This is due to the generated SQL statement the Powerapps MSSQL connector is generating for these functions. Please reference https://stackoverflow.com/questions/13198476/cannot-use-update-with-output-clause-when-a-trigger-is-...

Status: New
Comments
Super User

I got this on submission of a form that has an SQL table as source.  I dont know what a trigger means.  Can anyone clarify??

Level: Powered On

This is talking about a database table trigger, defined in the database for the table you're trying to update. If one is defined for the table you're trying to update, it would be visible in sql management studio for the definition of that table.

 

I'd insert a screenshot, but this powerapps forum platform is garbage.

A SQL Server trigger is a piece of procedural code, like a stored procedure which is only executed when a given event happens. There are different types of events that can fire a trigger. Just to name you a few, the insertion of rows in a table, a change in a table structure and even a user logging into a SQL Server instance.

 

Super User

Ah yes, thanks @jakekemme .  The trigger was just to create a modified date.  I'm doing that via PA now, so i just deleted it.  All works fine now.  Thanks!