Background
I'm trying to get obtain a unique identifier out of a computer and want to be able to reliably return the same MAC address each time. Trust me I have my reasons for using MAC address and have read many posts about alternate unique id methods (and yes i've considered if they don't have any network cards).
Problem
The prob...
I have an object with the following properties
GID
ID
Code
Name
Some of the clients dont want to enter the Code so the intial plan was to put the ID in the code but the baseobject of the orm is different so I'm like screwed...
my plan was to put ####-#### totally random values in code how can I generate something like that say a windo...
Hi
What is the best data type to choose in C# for representing a SQL Serer UniqueIdentifier type? I'm was going to use a GUID but I've seen people using varChars.
Thanks
...
Why does aspnet_users use guid for id rather than incrementing int?
Also is there any reason no to use this in other tables as the primary key? It feels a bit odd as I know most apps I've worked with in the past just use the normal int system.
I'm also about to start using this id to match against an extended details table for extra us...
Hi all,
I have a window that looks like so:
Everytime a record is added, I want the repair ID to be set to a unique number that hasn't been used in the table yet. e.g. if there is ID numbers 1,2,3, then when I press +, the ID field should be set to '4'.
Also, if one of the records in the table is deleted, so that the ID numbers are: ...
I have created a database where I use uniqueidentifier as the primary key. I'm trying to run a parametrized query that in the end looks like this. (insert into someTable (uniqueID) Values('76c14693-5475-4224-ba94-7d30c919ac59') (uniqueID is my PK). This insert statement executes without issues when I run it in SQL Server Management Stu...
Hi , I have read a lot of articles about whether we should have primary keys that are identity columns, but I'm still confused.
There are advantages of making columns are identity as it would give better performance in joins and provides data consistency. But there is a major drawback associated with identity ,i.e.When INSERT statement ...
For various reasons that aren't too germane to the question, I've got a table with a composite key made out of two integers and I want to create a single unique key out of those two numbers. My initial thought was to just concatenate them, but I ran into a problem quickly when I realized that a composite key of (51,1) would result in the...
I've got 10 tables that I'm joining together to create a view. I'm only selecting the ID from each table, but in the view, each ID can show more than once, however the combination of all ID's will always be unique. Is there a way to create another column in this view that will be a unique ID?
I'd like to be able to store the unique ID a...
Hello
I'm getting a uniqueidentifier into a Stored Procedure that looks like this "00000000-0000-0000-0000-000000000000".
This seems like a simple thing, but how can identify that this is a blank uniqueidentifier?
If I get a value like this "DDB72E0C-FC43-4C34-A924-741445153021" I want to do X
If I get a value like this "00000000-0...
I've found a number of different questions on generating UIDs, but as far as I can tell, my requirements here are somewhat unique (ha).
To summarize: I need to generate a very short ID that's "locally" unique, but does not have to be "globally" or "universally" unique. The constraints are not simply based on aesthetic or space concerns...
Ok this is a tricky one to explain.
I am creating an app that will have PAGES, currently I'm using PageID as the key to SEL the record.
The issue I'm having now is that I want users to be able to EDIT pages, but not lose the previous page (for history, recording keeping reasons, like a changelog or wiki page history).
This is making m...
How do I generate a UUID that will uniquely identify a computer using Xcode / Objective-C? Windows has UuidCreateSequential(), what can I use on a Mac?
...
Hi,
I'd like to get an id unique to a computer with Java, on Windows, MacOS and if possible, linux. It could be a disk UUID, motherboard s/n...
Runtime.getRuntime().exec can be used (it is not an applet).
Ideas ?
...
What can be the best algorithm to generate a unique id in C++?
The length ID should be a 32 bit unsigned integer.
...
When I used this CD cataloging program on Windows, it would identify each CD by a (mostly unique) four-byte serial number, like 376b-4554. The dir command of cmd.exe would show a serial number too.
Now I'm on Linux, and trying to hack my own small CD catalog script. Is there a way to read that serial number from an inserted CD? Or, if n...
I stumbled upon the following python weirdity:
>>> two = 2
>>> ii = 2
>>> id(two) == id(ii)
True
>>> [id(i) for i in [42,42,42,42]]
[10084276, 10084276, 10084276, 10084276]
>>> help(id)
Help on built-in function id in module __builtin__:
id(...)
id(object) -> integer
Return the identity of an object. This is guaranteed to b...
Problem was solved check my answer
Hi,
I'm having a trouble with getting the id after inserting a new Record using PHP Doctrine Project.
In inserting a new record in a table with no parent table (no foreign key) no problem happens.
But when inserting a related record here comes the problem, that I get only the parent id which is use...
What datatype should I use in C# to work with the SQL Server uniqueidentifier. Do I need any conversions etc ?
Thanks
...
Algorithmically speaking, how could I generate a unique, human readable, reasonably lengthed - order number for SQL Server column. The only requirement is that it references the Customer Number and can be easily repeated over the phone.
Something like:
Customer Number - XXXXXXXX - XXXXXXXX
RT65-XXXXXXXX-XXXXXXXX
How would I genera...