Re: How to create an "activation code" and store it in sql server 2005 database?

Tech-Archive recommends: Fix windows errors by optimizing your registry



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
email
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/


.



Relevant Pages

  • Re: How to create an "activation code" and store it in sql server 2005 database?
    ... to the user with a link to go to and enter the activation code. ... Seth Rowe http://sethrowe.blogspot.com/ ... Though I neglected to read the "no longer than 12 characters" part. ... you could have SQL Server create the Guids for you and not have to ...
    (microsoft.public.dotnet.languages.vb)
  • Re: How to create an "activation code" and store it in sql server 2005 database?
    ... to the user with a link to go to and enter the activation code. ... Though I neglected to read the "no longer than 12 characters" part. ... you could have SQL Server create the Guids for you and not have to ... Seth Rowe http://sethrowe.blogspot.com/ ...
    (microsoft.public.dotnet.languages.vb)
  • Re: spoofing question
    ... > I am not at liberty to do this as I do not have SQL Server. ... The GUID suggestion was merely one way of creating an "unguessable" session ... could randomly generate a string of digits and check your db for uniqueness. ... characters, you would need 38.53 characters to cover the same range of ...
    (microsoft.public.inetserver.asp.general)
  • Re: Stored proc with version number ?
    ... in addition to letter characters from other languages. ... Certain symbols at the beginning of an identifier have special meaning ... in SQL Server. ... I choose> the existing stored proc uspTableSave and right click Properties. ...
    (microsoft.public.sqlserver.programming)
  • Re: Can you use osql in DTS?
    ... each one of these queries has in it the same first 18 characters (or ... it from Query #3. ... > Columnist, SQL Server Professional ...
    (microsoft.public.sqlserver.dts)