There are a number of similar situations in the site but the one that got me
on this topic today was a self registration form for users from a specific
company. The user goes to the form & enters their first name, last name &
email address.
I've got various user types & levels, but everyone who comes in from this
form will have the same properties. There are also status' that relate to
users.
My business rule is that I can only have one email address (username) that
is of this type and level & has a status of active. So before I begin at
activating the registration I query the database to see if there are any
records that meet this criteria if the record count is 0 I continue with the
registration - if not I output an error message "You have already registered
for this service" and exit.
So....
Back buttons should not be a problem, neither should visiting the form a
week later & trying to register. The only way I can see duplicate entries
popping up is if I have 2 (or more) simultaneous registration requests.
To put it in context we've has over 2000 people use this form in the last 2
months and of these there have been 8 duplicates. Its not a huge problem but
its time consuming cleaning up the mess. All of these users are from one
organisation and I know that there are major IT infrastructure problems, for
example they often have a 2 hour que on the email server ("Have you got that
email yet?" "Um no." "OK I'll call back tomorrow, it should have arrived by
then").
----------------
3.) Surround the above code with a <cflock name="#Form.UUID#" type
="exclusive"> to guard against race conditions
----------------
This is what I want to know! Can does cflock prevent all enclosed code being
run simultaneously or does it just prevent reading & writing of session,
application & server variables?
If so then this should be all I need to do, because I am already using my
email address form input as a unique identifier.
Thanks for the help everyone :)
Cheers
Mark
______________
Mark Stanton
Web Production
Gruden Pty Ltd
Tel: 9956 6388
Mob: 0410 458 201
Fax: 9956 8433
www.gruden.com
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MX Downunder AsiaPac DevCon - http://mxdu.com/