Answered by:
Email Activation Guid

Question
-
User822391386 posted
Hi guys
Simple question, what data type should my database field be when I save a Guid for email activation?
Thanks
Tiaan
Monday, March 15, 2010 1:18 PM
Answers
-
User-1498408751 posted
Off the top of my head i think it's 32 characters long. varchar(40) should do the trick. Try a google search to double check the length
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, March 15, 2010 3:00 PM -
User-1882799931 posted
yeah, varchar(40) is enough
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, March 15, 2010 3:11 PM
All replies
-
User-1882799931 posted
You can use uniqueidentifier data type (SQL server)... or a varchar where you save the GUID generated from your app.
Monday, March 15, 2010 1:45 PM -
User822391386 posted
janctil
The thing is I use the built in NewGuid function in vb.net to generate a VERY long string. SHould I use varchar? How many shoudl the characters between brackets be e.g varchar(100)?
Tiaan
Monday, March 15, 2010 2:54 PM -
User-1498408751 posted
Off the top of my head i think it's 32 characters long. varchar(40) should do the trick. Try a google search to double check the length
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, March 15, 2010 3:00 PM -
User-1882799931 posted
yeah, varchar(40) is enough
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, March 15, 2010 3:11 PM -
User-1199946673 posted
or a varchar where you save the GUID generated from your app.Why can a GUID generated in code not be stored in a uniqueidentifier column in SQL Server? It always works for me!
Monday, March 15, 2010 3:18 PM -
User-1882799931 posted
never try this this, but your right! Each time i work with uniqueidentifier data type, I always get my GUID from database (NEWID).
Monday, March 15, 2010 3:36 PM