The user ID in the connection string is not a variable and is different from the user ID (for example, GUID) of your program. How do you delete the audit log if your connection string user id is static?
The best place to insert / update / delete a log is through triggers. But with a static connection string, it's hard to register who is deleting something. Which alternative?
With SQL Server, you can use CONTEXT_INFO to pass information to a trigger.
( -), (, ). .
. - , , .
. , , LastChgID LastChgDate. , ( ), , , LastChgID , .
Source: https://habr.com/ru/post/1705552/More articles:Средство просмотра процессов для устройств Win CE - windows-ceWhat is the best Java parser tool for my own language grammar? - javaDelphi Progress Bar - delphiWhat is the PostgreSQL equivalent of MSSQL CONTEXT_INFO? - loggingReverse mysql_fetch_array () - phpРекомендуемый стек замка Виндзор/NHibernate? - nhibernateИсследователь командной строки Visual Studio показывает красный крест в папке отчетов build en - visual-studio-2008How to stop a gridview column from automatically encoding html objects - asp.netУдалениеиз текстового файла? - htmlAre Enterprise Java Beans Still Useful Compared to Spring? - springAll Articles