Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - ASP / HTML Form + Autonumber
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ASP / HTML Form + Autonumber

 Post Reply Post Reply
Author
MortiOli View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 May 2002
Location: United Kingdom
Status: Offline
Points: 514
Post Options Post Options   Thanks (0) Thanks(0)   Quote MortiOli Quote  Post ReplyReply Direct Link To This Post Topic: ASP / HTML Form + Autonumber
    Posted: 23 November 2006 at 8:16pm

Hi all,

I'm trying to create a form which, once filled in, submits it to the required email address, and into a database to record the submission.

I can achieve that, but I'd also like each form to have a unique ID, ie the AutoNumber in the database, and for that to be emailed to the address at the same time.

Does anyone have / know of any code to do this please?

For example, someone fills in form, they click submit, the details are entered into the DB, the AutoNumber is pulled back and all the details, with the AutoNumber are emailed to the person.

Any help would be greatly appreciated!

Thanks

Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 23 November 2006 at 8:20pm
insert the record  into the db

use the .requery feature

then .movelast

and newID = object("AutoNumber")

now send the email with the newID value enabled
Back to Top
MortiOli View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 May 2002
Location: United Kingdom
Status: Offline
Points: 514
Post Options Post Options   Thanks (0) Thanks(0)   Quote MortiOli Quote  Post ReplyReply Direct Link To This Post Posted: 23 November 2006 at 8:24pm

Sorry to sound cheeky, but do you have an example I could work from?

I'm not very clued up when it comes to ASP - really wish I was.
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 23 November 2006 at 8:28pm
take a look at the WWF register .asp file this uses this idea.

you need to set the cursor and lock types

that file does it all
Back to Top
MortiOli View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 May 2002
Location: United Kingdom
Status: Offline
Points: 514
Post Options Post Options   Thanks (0) Thanks(0)   Quote MortiOli Quote  Post ReplyReply Direct Link To This Post Posted: 23 November 2006 at 8:49pm
I worked through the below to try and understand the insert into the database, then email the form;
 
 
I think I'm way out of my depth with the retrieving the AutoNumber.
 
Thanks for your help anyway Aaron.
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 23 November 2006 at 9:49pm
thats ok, im me if you still need it
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.