Re: What to search for
- From: Göran Andersson <guffa@xxxxxxxxx>
- Date: Sat, 06 Sep 2008 00:25:30 +0200
Miro wrote:
In my scenario I created - I am trying to create a dummy poker timer for him and save his settings to an xml file.
That way sql express doesnt need to be installed or anything.
(Basically 1 step up from a csv file - so I can learn a bit on how to use xml files - and he gets a dummy poker timer )
So this xml file is never shared by anyone / never used by multiple people at the same time. It basically just stores the rounds & blinds.
With a scenario like this - yes I see how a GUID would be better than my unique auto-incrementing key.
Because with this scenario - if i use my auto-incremeneting key idea - yes everything works - but its still a negative# that is written to the xml file. Your GUID would fix it - or I would have to manually run through and search for negative keys and convert them to positive ones.
Why would negative key values be a problem in the first place?
I am now just trying to think of an example ( cause I thought a poker timer would be simple enough ), where my xml idea with keys would work.
But from what I have come to learn, is basically - if "I/Anyone" plans to use an xml file as a 'settings file (like in my case)", then if I want to have keys - I should ALWAYS use a GUID as the key, and the Unique Auto-Increment Key setting - use that only if ever connecting to a database.
Is that a correct assumption?
No.
A GUID is excellent if you have distributed data, i.e. you need to create unique keys without having all the data available at the moment. In your case your data is limited to your xml file, so you always have all the data. Therefore you can always create a unique value without problem, and the usefulness of a GUID is very small.
--
Göran Andersson
_____
http://www.guffa.com
.
- Follow-Ups:
- Re: What to search for
- From: Cor Ligthert[MVP]
- Re: What to search for
- References:
- What to search for
- From: Miro
- Re: What to search for
- From: Göran Andersson
- Re: What to search for
- From: Miro
- Re: What to search for
- From: Cor Ligthert[MVP]
- Re: What to search for
- From: Miro
- What to search for
- Prev by Date: Adding Image Objects to Panel
- Next by Date: Citizen Silhouette Eco-Drive Womens Watch EW8400-55E Recommendation Discount Watches
- Previous by thread: Re: What to search for
- Next by thread: Re: What to search for
- Index(es):
Relevant Pages
|