uniqueidentifier

How to determine MAC Address of the actual physical network card -- not virtual network interfaces created by VPN's (.NET C#)

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...

C# Random Code Field Generator for Object

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...

SQL Server 2005 UniqueIdentifier and C# Data Type.

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? bonus points for help on extending user fields

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...

Core Data: Generate Unique ID Number

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: ...

Using uniqueidentifier as Primary Key and inserting it from the client application using parameterized queries.

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...

is it good to have primary keys as Identity field

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 ...

Is there a simple way to create a unique integer key from a two-integer composite key?

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...

Is it possible to create a Unique ID in an SQL Server View that will remain the same each time the view is called?

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...

How do I identify a blank uniqueidentifier in SQL Server 2005?

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...

Generating a Not-Quite-Globally Unique Identifier

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...

MySQL - Coming up with a Unique Key for each record, not the primary Key

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...

Generating a computer-specific UUID in Xcode

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? ...

How to get a unique computer identifier in Java (like disk id or motherboard id)

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 ? ...

Algorithm for generating a unique ID in C++?

What can be the best algorithm to generate a unique id in C++? The length ID should be a 32 bit unsigned integer. ...

Finding the serial number of a CD

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...

Python Identity Problem: Multiple Personality Disorder. Need Code Shrink

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 with getting ID after inserting a record that has relation in Doctrine

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...

SQL Server unique-identifier equivalent in C#

What datatype should I use in C# to work with the SQL Server uniqueidentifier. Do I need any conversions etc ? Thanks ...

How to create a unique order number

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...