In addition to William's response, IMO looping is unneeded in practice (you
meant to avoid a collision between GUIDs ?). Uniqueness is not a
mathemathical guarantee but it is AFAIK such a low probability that
basically it won't happen during your lifetime...
So mathematically it could happen (from wikipedia the probability is 1 on a
quintillion). For us mere mortals, it won't happen...
---
Patrice
"BLUE" <blue> a écrit dans le message de news:
%23AJizm7oHHA.4652@TK2MSFTNGP02.phx.gbl...
[quoted text, click to view] >A GUID is a 128-bit integer (16 bytes) that can be used across all
>computers and networks wherever a unique identifier is required.
>
> There is a very low probability that the value of a new Guid is all zeroes
> or equal to any other Guid.
>
> From MSDN we know that there is a possibility to have two equal Guid.
>
> I have two or more apps syncing their data with a db through a Web Service
> and I cannot rollback synchronization beacause of a field was already
> inserted.
> I've a varchar field where I put the ID of an RFID tag, but if the app
> user do not want to use this ID I'll generate it automatically with C#
> NewGuid method converting the guid to an alphanumeric string without
> dashes (so it is consistent with RFID ID).
> It's good to do a loop until the insertion goes well?
>
>
> How can I implement the "no insert" paradigm: if I want to create N
> pre-filled rows that will be used by a "client application instance" I can
> only do that if I set an Identity column but how to do that if I want to
> insert manually the primary key values as stated above?
>
>
> Thanks,
> Luigi.
>