Questions tagged [guid]

A GUID (Globally Unique IDentifier) is a unique reference number used as an identifier in computer software.

A GUID (Globally Unique IDentifier) is a unique reference number used as an identifier in computer software. It is Microsoft's implementation of the UUID standard.

2008 questions
105
votes
3 answers

UUID format: 8-4-4-4-12 - Why?

Why are UUID's presented in the format "8-4-4-4-12" (digits)? I've had a look around for the reason but can't find the decision that calls for it. Example of UUID formatted as hex string: 58D5E212-165B-4CA0-909B-C86B9CEE0111
Fidel
  • 7,027
  • 11
  • 57
  • 81
104
votes
5 answers

SCOPE_IDENTITY() for GUIDs?

Can anyone tell me if there is an equivalent of SCOPE_IDENTITY() when using GUIDs as a primary key in SQL Server? I don't want to create the GUID first and save as a variable as we're using sequential GUIDs as our primary keys. Any idea on what the…
handles
  • 7,639
  • 17
  • 63
  • 85
97
votes
4 answers

Guid.Parse() or new Guid() - What's the difference?

What is the difference between these two ways of converting a string to System.Guid? Is there a reason to choose one over the other? var myguid = Guid.Parse("9546482E-887A-4CAB-A403-AD9C326FFDA5"); or var myguid = new…
brennazoon
  • 1,379
  • 2
  • 12
  • 11
97
votes
6 answers

guid/uuid in Typescript Node.js app

I try to make a uuid (v 3.0.1) package work in Node/Typescript app, but I'm not sure what should I import and how to use it. This is index.d.ts (from @types/uuid v 2.0.29): declare namespace uuid { interface V1Options { node?: number[]; …
tBlabs
  • 2,619
  • 3
  • 18
  • 22
95
votes
16 answers

What exactly is GUID? Why and where I should use it?

What exactly is GUID? Why and where I should use it? I've seen references to GUID in a lot of places, and in wikipedia, but it is not very clear telling you where to use it. If someone could answer this, it would be nice. Thanks
Danmaxis
  • 1,710
  • 4
  • 17
  • 27
92
votes
10 answers

How to convert a GUID to a string in C#?

I'm new to C#. I know in vb.net, i can do this: Dim guid as string = System.Guid.NewGuid.ToString In C#, I'm trying to do String guid = System.Guid.NewGuid().ToString; but i get an "Cannot convert method group 'ToString' to non-delegate type…
Dave
  • 1,910
  • 2
  • 21
  • 27
92
votes
10 answers

How unique is the php session id

How unique is the php session id? I got the impression from various things that I've read that I should not rely on two users never getting the same sessionid. Isn't it a GUID?
Jalov
  • 923
  • 1
  • 7
  • 5
90
votes
4 answers

How many characters are there in a GUID?

Using ASCII encoding, how many characters are there in a GUID? I'm interested in the Microsoft style, which includes the curly brackets and dashes.
Jim Counts
  • 12,535
  • 9
  • 45
  • 63
90
votes
2 answers

A TypeScript GUID class?

Does anyone know of a good, solid, implementation of C# like GUID (UUID) in TypeScript? Could do it myself but figured I'd spare my time if someone else done it before.
Gustav
  • 3,408
  • 4
  • 24
  • 41
89
votes
5 answers

How to use Guids in C#?

This Code: Something = new Guid() is returning: 00000000-0000-0000-0000-000000000000 all the time and I can't tell why? So, why?
Ante
  • 8,567
  • 17
  • 58
  • 70
88
votes
5 answers

What is {{$guid}} used for in Postman?

Postman's official website states that Postman has a few dynamic variables. My question is about: {{$guid}}: Adds a v4 style guid What kind of variable is {{$guid}}? How can it be used in test scripts for API requests?
Nurlan Mirzayev
  • 1,120
  • 1
  • 7
  • 15
87
votes
5 answers

What are the project GUIDs in a Visual Studio solution file used for?

I have multiple projects in a single Visual Studio (2008) solution. I just discovered that each of these projects uses a same GUID, so in the solution file it looks like this: Project("{FAE04EC0-F103-D311-BF4B-00C04FCBFE97}") = "Pro1",…
Marc
  • 9,012
  • 13
  • 57
  • 72
80
votes
6 answers

How to declare a constant Guid in C#?

Is it possible to declare a constant Guid in C#? I understand that I can declare a static readonly Guid, but is there a syntax that allows me to write const Guid?
smartcaveman
  • 41,281
  • 29
  • 127
  • 212
80
votes
5 answers

C# guid and SQL uniqueidentifier

I want to create a GUID and store it in the DB. In C# a guid can be created using Guid.NewGuid(). This creates a 128 bit integer. SQL Server has a uniqueidentifier column which holds a huge hexidecimal number. Is there a good/preferred way to…
Daniel
  • 16,026
  • 18
  • 65
  • 89
74
votes
14 answers

How to create a GUID in Excel?

I need a function to add a GUID to cells in excel. I found this previous question on stackoverflow, but it is not working. It suggests the following…
fraxture
  • 5,113
  • 4
  • 43
  • 83