Last post Mar 15, 2010 03:36 PM by janctil
Mar 15, 2010 01:18 PM|chubbspet|LINK
Simple question, what data type should my database field be when I save a Guid for email activation?
Mar 15, 2010 01:45 PM|janctil|LINK
You can use uniqueidentifier data type (SQL server)... or a varchar where you save the GUID generated from your app.
Mar 15, 2010 02:54 PM|chubbspet|LINK
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)?
Mar 15, 2010 03:00 PM|falsead|LINK
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
Mar 15, 2010 03:11 PM|janctil|LINK
yeah, varchar(40) is enough
Mar 15, 2010 03:18 PM|hans_v|LINK
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!
Mar 15, 2010 03:36 PM|janctil|LINK
never try this this, but your right! Each time i work with uniqueidentifier data type, I always get my GUID from database (NEWID).