I wanted to find out the best strategy (and the source code to implement it) to use at INSERT and UPDATE time. I have a WinForms application developed in VS2005 and SQLServer 2000. The current user ID is stored in a global variable g_userid and I am using a DataGrid1 bound to a daComms.
Is it better to populate CreatedBy and LUpdatedBy fields using custom InsertCommand and UpdateCommand of the daComms or should Triggers be used to do that. Sample codes for both methods are needed and would help me a lot.