I am attempting to create a "read" trigger. My client has an older system that uses select statements to validate userid and passwords. Now they want to be able to implement an automated lockout after X failed attempts in Y minutes.
My current approach is ot use view based on a table value function to replace the original users table.
The TVF works fine and the account lockout (using a secondary non-enlisted connection) also works fine.
Unfortunately as soon as I starting working on the instead of triggers for update and delete I receive errors.
If I can solve one error the same solution will most likely solve the others as well...
The first error is:
A .NET Framework error occurred during execution of user-defined routine or aggregate "TestUserTable":
"Invalid use of side-effecting or time-dependent operator in 'UPDATE' within a function."
I recieve this when I attempt to execute the following sql:
update usertable set manager='fubar' where loginid='Chris'
at this point in time the update instead of trigger is defined as follows:
create trigger tr_vwUserTable on UserTable
Instead of update
--do nothing for now
update usertable_old set manager='fubar'
My understanding is that instead of triggers execute...well instead of the action...so why am I receiving this obscure error?
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder. The folder can be on the local hard drive or on a network share. This batch file will query the SQL server to get the current date & time and wi…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online.
The email signature template has been downloaded from:
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email
Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…