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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

run command and post form to next page

Status
Not open for further replies.

mother911

Technical User
Jul 28, 2003
15
0
0
US
I'm trying to submit a form which will run a stored procedure (as a command) and the output of that command will either
a. show an error value with text to explain the error (username already taken) and return the url of the first page.

or

b. return no error value (error=0) and post the form data to a new URL.

right now, I have the page posting to the new page fine. The command runs, but the page posts to the default URL value instead of the output of the command. Please tell me how I am clearly doing something stupid and shorten the duration of forehead to wall meeting I am having.

Thanks,
Mother
 

[1] filter the exsiting records looking for the entered username.password WHERE.......

[2] IF RS EOF THEN

'the username is NOT found in the recordset so it is OK to run the stored procedure of eg.

[3]AddUser command
ELSE

Response.Redirect("UserExists.asp")
END IF
----------------------------------------------------
All the best!

> need more info?
:: don't click HERE ::
 
hey Leb,

I have the command and all that stuff down fine. I need to run the command before the post form runs, so I can populate the url for the form to post to from the commands output. If I submit once, it runs the command and inserts the needed data, but...it submits to the default url for the post action, not the new one from the command.
 
the post is just a form's action......it does not do anything but that...the command on the page to which ur posting is where it all happens....there u can simply arrange the order of things:
ActionPage.asp-----------------------

-request.form("filelds")
-filter records(by command or procedure) to look up if the records exists
-IF _it exists THEN write a error message or redirect somewhere
-ELSE
-ececute procedu toupdate records
-----------------------------------

> need more info?
:: don't click HERE ::
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top