help with an update (stored procedure)

Arg81

Well-known member
Joined
Mar 11, 2005
Messages
949
Location
Midlands, UK
Programming Experience
1-3
Not sure what the best way of doing this is, i think a stored procedure.

Basically, I have set up a form that has one field - the user enters the ID number.

Upon pressing SUBMIT, I want to change the value of another field belonging to that row.
I.E.
UPDATE StatusID to 2 (by default is set to 1) WHERE RequestNumber = @RequestNumber
(with the textbox.text = @RequestNumber)

What would be the easiest and best way of doing this?

Cheers!
Luke
 
OK to add to this now....

I don't want to change the StatusID if a field in a related table is blank.

I.E. If a Revision has not had any feedback left then it can't be marked as Complete.

The Feedback Column is in the Revisions Table, which is related to the Main Table.

I've put in my program that another revision cannot be added if the previous one has got no feedback, but that's within the same table so it was easy to code.

Anyone done something similar?

Cheers,
Luke
 
Back
Top