Re: How to create an "activation code" and store it in sql server 2005 database?
- From: "Andy B" <a_borka@xxxxxxxxxxxxx>
- Date: Fri, 8 Aug 2008 12:49:01 -0400
Couldn't you have sql server take a sub set of characters of the guid it
creates and use that instead?
"rowe_newsgroups" <rowe_email@xxxxxxxxx> wrote in message
news:d53bbc24-8d74-4fa9-81bc-64e802a1a775@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Aug 8, 8:08 am, rowe_newsgroups <rowe_em...@xxxxxxxxx> wrote:
On Aug 8, 7:47 am, "Andy B" <a_bo...@xxxxxxxxxxxxx> wrote:
I am making a web application that would randomly create an activation
code
and put it in a database. The web application would then send it in an
to the user with a link to go to and enter the activation code. How
would I
do this? and what sql server data type would I use? I want the
activation
code to be no longer than 12 characters, have a mix of numbers and
letters
and have no special symbols.
System.Guid would be the easiest in my opinion.
Thanks,
Seth Rowe [MVP]http://sethrowe.blogspot.com/
Though I neglected to read the "no longer than 12 characters" part.
Oops.
The benefit of using System.Guid (or Unique Identifier in SQL) is that
you could have SQL Server create the Guids for you and not have to
worry about handling duplicate activation codes. Though if the 12
character rule is a must, this benefit is negated.
Thanks,
Seth Rowe [MVP]
http://sethrowe.blogspot.com/
.
- Follow-Ups:
- Re: How to create an "activation code" and store it in sql server 2005 database?
- From: a a r o n . k e m p f @ g m a i l . c o m
- Re: How to create an "activation code" and store it in sql server 2005 database?
- From: rowe_newsgroups
- Re: How to create an "activation code" and store it in sql server 2005 database?
- References:
- How to create an "activation code" and store it in sql server 2005 database?
- From: Andy B
- Re: How to create an "activation code" and store it in sql server 2005 database?
- From: rowe_newsgroups
- Re: How to create an "activation code" and store it in sql server 2005 database?
- From: rowe_newsgroups
- How to create an "activation code" and store it in sql server 2005 database?
- Prev by Date: Re: Form.Shown and CurrentPrincipal
- Next by Date: Re: How to create an "activation code" and store it in sql server 2005 database?
- Previous by thread: Re: How to create an "activation code" and store it in sql server 2005 database?
- Next by thread: Re: How to create an "activation code" and store it in sql server 2005 database?
- Index(es):
Relevant Pages
|