.dsy:it.
Show 150 posts per page

.dsy:it. (http://www.dsy.it/forum/)
- Forum De Bell Tolls (http://www.dsy.it/forum/forumdisplay.php?forumid=7)
-- [PROGRAMMAZIONE] Guid (http://www.dsy.it/forum/showthread.php?threadid=10103)


Posted by ripe on 11-04-2004 20:50:

[PROGRAMMAZIONE] Guid

Quante probabilità ci sono che un GUID generato da Asp.Net (o con qualsiasi altro metodo) possa risultare duplicato? C'è qualche modo per evitare che questo accada??

Grazie!

P.S.: vorrei evitare di finire il mio portale e di vederlo andare in vacca per questo problema! :D

__________________
«And if you ever smell christian blood up in the mountains, then get your axe and chop them down!»


Posted by 0m4r on 12-04-2004 15:31:

Off-Topic:
cose è un GUID?

__________________
http://www.twitter.com/0m4r


Posted by ripe on 12-04-2004 16:53:

E' una stringa che può essere usata come chiave ad esempio di un database e viene generata in base a vari parametri come giorno/ora/ip dell'utente... ecc, ecc.

Il mio dubbio è solo se possa capitare di ottenere due GUID diversi in momenti diversi... ma anche su Google non riesco a trovare molto! :?

__________________
«And if you ever smell christian blood up in the mountains, then get your axe and chop them down!»


Posted by lughes on 13-04-2004 19:25:

Teoricamente la possibilità che sia duplicato è possibile, infatti tutti i numeri o le stringhe generate a caso utilizzano un algoritmo preciso. La bontà di un algoritmo di questo tipo si piò giudicare in base alla probababilità molto bassa che questo possa accadere...
Per quantificarlo però credo sia molto difficile se non si riesce a trovare qualcosa nella documentazione

__________________
...più beviamo più vinciamo e tanti gol possiamo far, e la Pratese stravincerà, noi che siamo gli invincibili e per questo siamo qui, per poter dire RITIRATEVI!!!


Posted by ripe on 13-04-2004 20:28:

Grazie della risposta! Sto scrivendo una piccola routine che controlli ogni GUID che viene generato per vedere se è un duplicato di uno già esistente! E' un pò un casino cercare in tutti i file xml per tutte le cartelle del portale, ma voglio stare sicuro! :)

Ancora grazie!

:ciao:

__________________
«And if you ever smell christian blood up in the mountains, then get your axe and chop them down!»


All times are GMT. The time now is 07:34.
Show all 5 posts from this thread on one page

Powered by: vBulletin Version 2.3.1
Copyright © Jelsoft Enterprises Limited 2000 - 2002.