Forums

This topic is locked

Update Recordset onLoad of Page

Posted 18 Oct 2002 23:15:26
1
has voted
18 Oct 2002 23:15:26 Randy Huitema posted:
Hello,
I am setting up a credit card authorization form and receive information back when card is confirmed that will display my recordset. Is there a way to have that recordset updated on the load of a page . This would be one field that would get a "Renewed" text update.

I am using ASP and VBSCRIPT.

Thanks for any help.

Replies

Replied 23 Oct 2002 16:38:02
23 Oct 2002 16:38:02 Some One replied:
Use Command;

Application > Server Behaviours > Command

Name : Anything
Type : update
Connection : Select your db conn

then select your db table filed to update and look around the code...

This will help to you...


Ferruh Mavituna : Freelance Web Designer & Developer;
Replied 24 Oct 2002 19:58:29
24 Oct 2002 19:58:29 Ned Frankly replied:
Soul, I know what you're talking about and I STILL didn't understand your response.

Randy, if you want to stick with MX functions alone (no hand coding) just do this:

Build an ASP page, no graphics, no display, and add a Form with a hidden field. This field will contain your data to be inserted (probably a Session variable or a QueryString). If this is an update to a record, add your recordset with the appropriate select statement to get just the record you want to update. If this is an insert, no recordset is required.

Now create your INSERT or UPDATE recordset behavior just as if you had a normal form with a submit button. Make the INSERT or UPDATE redirect URL the page you want displayed to the user.

Here's the trick: In your BODY tag, add onLoad="document.form1.submit()". The page will load, the form will submit, and the page will redirect to the 'pretty' page that you want your user to see.

Call this page as the 'success' URL for your card process (passing whatever variables you need) and you're done.

Ned Frankly
Replied 24 Oct 2002 23:50:29
24 Oct 2002 23:50:29 Randy Huitema replied:
Soul & Ned,

Thank you both for your replies. I ended up using Ned's suggestion with my page. Works great!!

Thanks again,
Randy

Reply to this topic