473,662 Members | 2,760 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Guid.NewGuid() is always returning all zeroes

I am using VS2004 and .Net 2.0. Every time Guid.NewGuid() is called,
the returned guid is all zeroes: {00000000-0000-0000-0000-000000000000}

In looking at the MSDN documentation on NewGuid(), it states:

"There is a very low probability that the value of the new Guid is all
zeroes or equal to any other Guid."

It seems I am in that "very low probability" group. Does anyone know
why?

Jan 25 '06 #1
2 6537
I am using VS2004 and .Net 2.0. Every time Guid.NewGuid() is called,
the returned guid is all zeroes: {00000000-0000-0000-0000-000000000000}


Can you post your code?
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Jan 25 '06 #2
Opps, I had two constructors, duh

Jan 25 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3973
by: Tom L | last post by:
How can I create a guid value in vb.net? I'm creating a sql procedure, and I want to pass the new guid value over to SQL instead of SQL creating it. thx
2
576
by: Jeff Lynch | last post by:
How do I create a new GUID programatically like the "Create Guid" tool does in VS.NET? -- Jeff Lynch "A BizTalk Enthusiast" http://dotnetjunkies.com/WebLog/jlynch/
6
3686
by: Jim Heavey | last post by:
When I use the new(Guid), the GUID which is generated is all zeros. Is there a technique for the system to assign a real Guid? Do I have to manually calculate a GUID?
9
34831
by: Rene | last post by:
I am using the Guid.Empty value ("00000000-0000-0000-0000-000000000000") to represent a special meaning. The problem is that I don't know if there is a chance that a command like "Guid.NewGuid()"would generate a Guid.Empty value could this be possible or is the "00000000-0000-0000-0000-000000000000" Guid reserved or something like that? Thank you.
4
1615
by: LL | last post by:
Hi, What's is function to get the GUID? Thanks,
5
13706
by: George | last post by:
I want to create a unique id for each of a set of objects. These ids may be generated on multiple machines simultaneously and must all be different to each other. There are an undefined number of machines involved (1 to dozens) and an indeterminate number of objects (many to very many on each machine). My best guess for a solution would be to use a GUID (all the machines have an ethernet connection so a GUID generated on any of them...
2
2684
by: Gary Dunne | last post by:
Is there a built in function for creating a Guid in VB .Net ? I know about the CoCreateGuid API call, but I though that maybe it's been built in to .Net ? I've found the GUID class and tried Dim oGuid as New Guid Dim sGuid = oGuid.NewGuid() But it gives me a blank GUID (string of zeros)
1
9129
by: Scott M. Lyon | last post by:
I've got a stored procedure that takes a few parameters as input parameters, and one output parameter (a uniqueidentifier). After the stored procedure call, I need to return that output parameter in a System.Guid object. Unfortunately, I'm having zero luck doing this. Public Function BuildExtract(byval ProjectNumber as string, byval ListNumber
1
3060
by: Scott M. Lyon | last post by:
I've got a stored procedure that takes a few parameters as input parameters, and one output parameter (a uniqueidentifier). After the stored procedure call, I need to return that output parameter in a System.Guid object. Unfortunately, I'm having zero luck doing this. Public Function BuildExtract(byval ProjectNumber as string, byval ListNumber
0
8435
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8345
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8768
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8547
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7368
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5655
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4348
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1999
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1754
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.