2568Using Triggers to Track Database Action Historyhttp://www.4guysfromrolla.com/webtech/091901-1.shtmlSeveral State and Federal contracts that I have worked on in the past have wanted to keep track of all changes to a particular record, such as who modified the record, what kind of modification took place, and when the record modification occurred. I decided to solve this problem with triggers because I wanted to capture every action that occurred on a particular table. For those unfamiliar with triggers, a trigger is a database-event that fires when a particular action occurs. For example, an INSERT trigger would fire when a particular database table has a record inserted. For a more in-depth examination of triggers, be sure to readASP > Tips and Tutorials > Database-relatedOct 10, 2006
As databases grow in size, displaying information in organized, consumable "chunks" becomes more and more difficult. For example, if a database table contains thousands or even hundreds of rows, simply dumping the entire contents of the table can overwhelm the user and be difficult to pick through. As developers it is our job to provide information in digestible quantities. One common solution is to page database table results. That is, only a small number of database records are shown per screen, accompanied by Next and Previous buttons allowing the user to step through the database results in sensible steps.
There are already a number of great 4Guys articles on paging database records. If you are using SQL Server it is strongly recommended that you use a stored procedure-based approach, as outlined in the article Paging through Records Using a Stored Procedure. A script that uses AbsolutePage, PageSize, and PageCount (three ADO properties designed to allow for paging) can be seen at Paged Table Display, authored by Charles Carroll and Jeff Emrich.
This article provides an alternative way to page through database records. This technique uses the GetRows method of the Recordset object. GetRows dumps the Recordset data into a two-dimensional array. The first dimension of the array stores the column information while the second dimension stores the row information. The following snippet of code illustrates how to use GetRows:
By centralizing database code within ActiveX DLL's, you can simplify your development efforts, and decrease the learning curve for new developers. In this article, we will create a Visual Basic ActiveX DLL that controls database functionality for our Active Server Page (ASP) demo.
code required for this page is very simple. A database connection is established and the database is queried for the record with the passed in ID. Then, the document's content-type is set to "image/gif" to let the browser know to interpret the coming data as an image. Finally, the Response.Binarywrite method is used to output the binary data from the database. Note how this is actually used in an IMG tag of an HTML page
Joining mailing list will entitle you
to receive occasional emails informing you of news and
updates to the site and any special offers that may be
of interest to you.