cancel
Showing results for 
Search instead for 
Did you mean: 

How does Ultralite create UUIDs?

Breck_Carter
Participant
2,523

From: Priyesh

Newsgroups: sybase.public.sqlanywhere.ultralite

Subject: How does Ultralite create UUIDs?

Date: 19 Apr 2010 09:25:26 -0700

Version 10.0.1.3579

Device: Samsung Saga

OS: Windows Mobile 6.1

I have a client installation where devices create UUIDs with a '1' in the third group. According to UUID articles this should mean the last group is constant if created from the same device as it uses the device mac address there.

In this particular instance, i need to find if the same physical device created some of the records i see at the server. Just wondering if this is a reliable way to go forward. So far the data does not seem to agree. Could you please explain how Ultralite creates UUIDs in Windows Mobile?

TIA

Priyesh

Accepted Solutions (0)

Answers (1)

Answers (1)

philippefbertrand
Participant

[repost from the newsgroup to ensure we have an answer on this question]:

On systems where we can't always obtain a MAC address, including Windows CE/Mobile, we generate a random 47 bit node ID in place of the MAC address. This node ID is constant only as long as the UltraLite runtime library is loaded in memory -- we do not persist the random node ID to storage. So, UltraLite's UUIDs do not provide a reliable way to determine the generating device.

If you want that kind of functionality, you could consider using global auto increment.

Hope that helps,

  • Tim

I would add that the best way to identify the device is to insert the remote id into the consolidated tables.

  • Philippe