Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 21st, 2003, 10:43 AM
Registered User
 
Join Date: Oct 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Suggestions on "holding table"?

I have a database of articles which are updated periodically. When an article is updated, it can't "go live" until is has been approved. In the meantime, the original version of the article needs to remain viewable until the revision is approved, then the original is replaced with the new version.

I've tried to accomplish this via two tables (one holding the approved, live versions, and one holding the "pending" revised versions). However, I can't seem to figure out how to construct the approval page(s) so that the pending article version is moved to the live table and then removed from the holding table. I am confounded by the requirement to temporarily have two versions of one record, then replace the old with the new. Any suggestions?

Thanks!

Almost forgot - Using Dreamweaver MX v1, ASP3.0/VBScript, IIS, Access.
 
Old October 21st, 2003, 11:27 AM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

OK, this can be implemented on the database to also allow you to keep track of changes and updates.

Instead of moving data from one table to the other
On the main table for your Article, keep the article information, on another table keep the Status for the article. When an article gets updated, a new record is entered on the Status table with a datetime field that takes a default value of Now(), and another for CurrentStatus, Default Value, "Updated" or something that makes sense to you.

Once the record gets entered as updated, you know that the article needs to be locked, to approve allow aproving authority to enter a value of "Approved" as a new record, which will also have a default value of Now() but a CurrentStatus of Approved, or something that makes sense to you.

to pull the current status, do a query to select Max of that table, and group it by Article.

Hope it helps, if you need more help, give table structure.
=)

Sal





Similar Threads
Thread Thread Starter Forum Replies Last Post
ArrayList Variable Holding Array iceman90289 C# 2005 1 June 24th, 2008 12:34 AM
All suggestions are welcome! Wooger Other Programming Languages 0 September 24th, 2007 09:47 AM
how to let the page holding for a few seconds walgr2k ASP.NET 2.0 Basics 1 May 19th, 2006 01:55 PM
Suggestions lagoonblue Visual C++ 0 June 13th, 2005 07:18 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.