Link to home
Start Free TrialLog in
Avatar of directxBOB
directxBOBFlag for Ireland

asked on

Creating a Unique ID

I am looking for advice or solution for creating a Unique ID. Basically I need to record a transaction id whenever my SOAP applications shake hands and I was unsure as to the best solution.

Previously I had just used an int, and bumped it up every time the handshake was made, but perhaps there is a better method like GUID?

Anyone got any ideas, or examples
ASKER CERTIFIED SOLUTION
Avatar of McExp
McExp
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of directxBOB

ASKER

So there is no requirement to track what ID was last used because they are random?
Yes, that is correct
Also given that a GUID is a 128bit integer I assume I can cast it to an int for general usage?
Guess so, It's not something I've ever had cause to do.