www.webdeveloper.com
Results 1 to 2 of 2

Thread: Unique Identifier SQL Server C# ADO.NET

Hybrid View

  1. #1
    Join Date
    Jul 2011
    Posts
    13

    Unique Identifier SQL Server C# ADO.NET

    Hello,

    I have a unique identifier that is generated in a SQL Server database e.g. "460bf55b-7353-4ea6-ba5f-24aca125698b". I would like to know apart from the obvious (string) is there another datatype that I should use to store it. Perhaps a char variable of length 36?

    Best Regards,
    Kevin

  2. #2
    Join Date
    Jul 2011
    Posts
    13
    Quote Originally Posted by nivekyenwod View Post
    Hello,

    I have a unique identifier that is generated in a SQL Server database e.g. "460bf55b-7353-4ea6-ba5f-24aca125698b". I would like to know apart from the obvious (string) is there another datatype that I should use to store it. Perhaps a char variable of length 36?

    Best Regards,
    Kevin
    Update!

    Use System.Guid, at run time an error will be thrown if you try and cast it to anything else

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles