Click here to Skip to main content
15,888,579 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
can you help me in determining the difference between the first function in c#
and the second one in Sql
if i use Guid.newGuid() can i guarantee that will be no conflict in ids if i have multiple data sources each one on a machine when i join them together
i read that the first version of Guid Generates the id depending on machine mac and timestamp which i think can insure uniqueness in multiple datasources on different machines am i wrong?
my second question is how can i determine the version of function Guid.newGuid in C#
Posted
Comments
Maciej Los 29-Nov-14 4:34am    
What's this for?

1 solution

1.Yes, by using Guid class, the resulted ID will be unique for all cases, and this was the propose of the GUID. You could find detail in the MDSN[^].

2.The second question is not clear. What do you want to check/do?
 
Share this answer
 
Comments
oula alsheikh 29-Nov-14 2:48am    
thanks i got confused because of this two pages
can you please read them
http://stackoverflow.com/questions/18472251[^]


http://forums.asp.net/t/364242.aspx[^]
Raul Iloc 29-Nov-14 8:33am    
You could use GUID in your application without fear, because their algorithms were designed to assure uniqueness!
oula alsheikh 29-Nov-14 2:50am    
what about newid() in sql does it guarantees uniqueness?
Raul Iloc 29-Nov-14 8:32am    
This function also generate a GUID that could be used in SQL tables, and because is an GUID is unique.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900