>I have a executable that is distributed to several organizations. Periodically the data from these organizations are combined. To aviod conflicts in the surrogate primary keys from each organization I want each system to prefix an organization code to the keys when they are created.
>
>How do I provide the organization code to the executable?
>
What kind of a constant? If you need a completely guarenteed unique identifier, generate a GUID using the Windows API and then store it somewhere, but that's a large (16 byte) value. If it's generated per machine, then save it in the registry, otherwise, you'll need a table or initialization file to draw the value from at runtime.