Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Upating a record in one table and then inserting it in another dilemma

Status
Not open for further replies.

TonyU

Technical User
Feb 14, 2001
1,317
US

Here's what I'm against and can't figure it out.

I'm developing a schedule website (in-house) that requires for projects to be submitted for denial\approval by members of management. So far so good and have this done

Default.asp --> displays all projects approved.(blank right now)

Request.asp --> allows user to input a project request.

RequestDisplay.asp --> displays all requests. In this page I have setup the request name to be a link to a details page of that request where management will be able to either approve it or deny it (no problems so far).

'************* here's my problem ************

On my approve page I'm inserting a update form displaying all records where the ID = the querystring clicked on RequestDisplay.asp (with me so far?, good) The form UPDATES fine BUT the problem is that now once updated, I have to move that data to a different table in order to display in my Default.asp where all approved projects display but don't know how to approach this or do it.

I apologize for being a bit long and hope I make sense.

Your assistance is greatly appreciated...

[tt]
"Beware of the most dangerous person in business - the articulate incompetent."
[/tt]

banana.gif
rockband.gif
banana.gif

 
I would suggest keep all the data in one table, with a field for approved, waiting etc. That way when you run an sql statement just select where approved =1 for example.

(p.s. how do you get the icons in your signature.)
 
I would agree with Gary, that way to populate the differant pages you need only query for the records with a certain status in the field. Unfortunatly between me seeing 0 replies, clicking the link, and reading the post, he beat me to it :p
-Tarwn "The problem with a kludge is eventually you're going to have to back and do it right." - Programmers Saying (The Wiz Biz - Rick Cook)
"Your a geek!" - My Girlfriends saying
 
[tt]
See, I would keep everything in one table but I'm trying to better understand and learn Relational Database Management (SQL 2000) plus this time I did not create the database I'm just using one already built.



About the images

simply read the Process TGML when you reply\create a post to know what to add to the image location like =
atom.gif
[tt]
"Beware of the most dangerous person in business - the articulate incompetent."
[/tt]

banana.gif
rockband.gif
banana.gif

 
[tt]Those bananas are always rocking

;-)
[tt]
"Beware of the most dangerous person in business - the articulate incompetent."
[/tt]

banana.gif
rockband.gif
banana.gif

 
In that case just run another update to the other table at the same time, everything will be identical bar the table name
 
something like this :) Saturday 12.00
im6.gif
im2.gif
im2.gif
20.00
im5.gif
im4.gif
im7.gif
3.00am
im8.gif
Sunday [img http
 
[tt]Sure, as long as you put 'em in your signature field.
[tt]
"Beware of the most dangerous person in business - the articulate incompetent."
[/tt]

banana.gif
rockband.gif
banana.gif

 
[tt]Alright guys, any more ideas on this? with what I have
[tt]
"Beware of the most dangerous person in business - the articulate incompetent."
[/tt]

banana.gif
rockband.gif
banana.gif

 
Pardon any shortness, no coffee yet.
You could pass the data in hidden fields from the selection page, delete from the request table where the record matches the passed data and insert a new record into the accepted table with that same data in it.
-Tarwn "The problem with a kludge is eventually you're going to have to back and do it right." - Programmers Saying (The Wiz Biz - Rick Cook)
"Your a geek!" - My Girlfriends saying
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top