473,697 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Automatic Creation and Modification log

Hi there,

I need some help in order to reduce the amount of code needed to
implement the logging of INSERT and UPDATE in my application's
database.

In every table of my database I have four fields (CreatedBy,
CreatedTime, ModifiedBy, ModificatedTime ), these fields allow me to
trace the users who create and modify the registers in my application.
I know that I can add in every stored procedure a piece of code who
uses the app user as a parameter, and insert these information in the
register. But I would like to go beyond these method. I imagine there
is a better way of doing it, and I don't like to use triggers. Is
there any method, within the SQLServer functionality, that allows me
to automate this process?

So, any help would be very appreciated!!
Thank you very much in advance!
Jul 20 '05 #1
1 1218
Phino wrote:
I imagine there is a better way of doing it, and I don't like to use
triggers. Is
there any method, within the SQLServer functionality, that allows me
to automate this process?


Yeah, triggers.

--
Steve Troxell
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
11326
by: Matt Traxinger | last post by:
Is there a function that determines when a file was created? Like if I wanted to return all the files created in the last month from a directory, is there a way to do that? I've googled and googled but can't find what I'm looking for. Thanks
3
1757
by: Ido | last post by:
Hello, I am searching for an automatic forms creation tool that will help me to save time in developin forms (preferrably with validation). My forms get some data from a MySQL database and are supposed to save all data back to the database. Any recommendations!?
7
3660
by: svilen | last post by:
hello again. i'm now into using python instead of another language(s) for describing structures of data, including names, structure, type-checks, conversions, value-validations, metadata etc. And i have things to offer, and to request. And a lot of ideas, but who needs them.... here's an example (from type_struct.py):
2
1181
by: Jeremy | last post by:
Is anyone aware of any features in .NET or 3rd party tools that would enable the automated creation/modification of graphics (e.g., buttons with text in them). I frequently need to modify only the text in various buttons, and I'm getting tired of doing it manually. I know there's GDI+, but I'm looking for something that doesn't require a lot of programming - if possible. Ideally something to which I can supply an input file with parameter...
5
1469
by: Russell Warren | last post by:
I just ran across a case which seems like an odd exception to either what I understand as the "normal" variable lookup scheme in an instance/object heirarchy, or to the rules regarding variable usage before creation. Check this out: >>> class foo(object): .... I = 1 .... def __init__(self): .... print self.__dict__ .... self.I += 1
1
1942
by: klimmass | last post by:
Hello Does anybody know a tool/macro with can automatically add a header comment to a .cs file at saving it ? I want something like this: eg. ///Automatic comment //CREATED BY: klimmass //MODIFIED BY: klimmass //MODIFICATION DATE: DateTime.Now()
3
10152
by: tkpmep | last post by:
I'd like to create a list of all files in a directory that were created after a certain date. How does one do this? I've used glob.glob to create a list of all files whose name matches a substring, but I don't see how I can use it to identify files by their creation date. Thanks in advance for the assistance. Thomas Philips
58
4654
by: Jorge Peixoto de Morais Neto | last post by:
I was reading the code of FFmpeg and it seems that they use malloc just too much. The problems and dangers of malloc are widely known. Malloc also has some overhead (although I don't know what is the overhead of automatic variable sized arrays, I suspect it is smaller than that of malloc), although I'm not too worried about it. I was thinking that, with C99's variable length arrays, malloc shouldn't be needed most of the time. But I'm...
2
3706
by: =?Utf-8?B?UmV5bm9sZHNVc2Vy?= | last post by:
Is there a way from within a C# app to create a printer? I am looking to automate the creation of (possibly) dozens of printers, to prevent having to go through the "Add Printer Wizard" so many times. The app will have access to all the info necessary as if "Add Printer Wizard" was being used, I just need to know if there's an elegant way to do this (short of nasty registry hacks).
0
2723
by: nichele | last post by:
Hi all, for troubleshooting purpose, I would like to add to all my tables (and for all records) the creation and modification timestamp fields. Do you know if this is a common practice ? Do you know if those dates are usually handled by triggers ? Any concern about database size ? Cheers, ste
0
8667
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9148
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8880
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8853
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5857
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4357
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4611
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3034
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2319
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.