Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 21st, 2003, 10:43 AM
Registered User
Join Date: Oct 2003
Location: Fairfax, VA, USA.
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?


Almost forgot - Using Dreamweaver MX v1, ASP3.0/VBScript, IIS, Access.
Reply With Quote
  #2 (permalink)  
Old October 21st, 2003, 11:27 AM
sal sal is offline
Friend of Wrox
Join Date: Oct 2003
Location: Clarksville, TN, USA.
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts

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.

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

All times are GMT -4. The time now is 10:48 PM.

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