guid

Using both a GUID and an auto-incrementing integer

I've been investigating the use of GUIDs as primary keys in databases. So far, the pros seem to outweigh the cons. However, I see one point where GUIDs may not be what I want. In my application, users should be able to identify objects based on a user-friendly ID. So, for example, if they want to get a specific product without typing in...

Asp.Net Button Event on refresh fires again??? GUID?

The obvious issue here is that on refresh a button event is recalled and duplicate posts are created in the database. I have read other questions on this site about the very same issue. Apparently the answer is for every post create a GUID and check to make sure the GUID is unique? I am not really sure how to implement this. Does that...

Best (most efficient) DataType to use for UUIDs as JPA IDs

I want to use UUIDs as IDs for my JPA Objects. I am currently just using a String to store the UUID. What would be more efficient? ...

SQL Server vs. Access insert performance, in particular when using GUID

I'm interested to know how I could improve the performance of SQL Server when using sequential GUID when using Access 2007 as a front end to SQL Server 2008 (please note it's the only context I'm interested in). I have made some tests (and gotten some fairly surprising results, in particular from SQL Server when using sequential GUID: t...

uniqueidentifier in Sql Server database - how to generate in Java environment?

I have a database table that uses Sql Server 2005's uniqueidentifier column. I know how to create GUIDs in C#... string newid = System.Guid.NewGuid().ToString(); However, the application that is inserting into this database is running Java. Is there a way to generate Sql-Server-compatible GUIDs using Java code? (NOTE: generating th...

Formulae's to generate a unique id?

I would like to get a few ideas on generating unique id's without using the GUID. Preferably i would like the unique value to be of type int32. I'm looking for something that can be used for database primary key as well as being url friendly. Can these considered Unique? 1) (int)DateTime.Now.Ticks 2) (int)DateTime.Now * RandomNumber ...

What is COM?

I searched hard, but was unable to grasp the whole idea. Can anyone tell me: What COM actually is? How do GUIDs work, and how are they used by COM? How does COM resolve the issues of different DLL versions. Or at least, point me to a good article somewhere that explains these concepts? Thanks! ...

LINQ to SQL Insert Sequential GUID

I have a database that is part of a Merge Replication scheme that has a GUID as it's PK. Specifically the Data Type is uniqueidentifier, Default Value (newsequentialid()), RowGUID is set to Yes. When I do a InsertOnSubmit(CaseNote) I thought I would be able to leave CaseNoteID alone and the database would input the next Sequential GUI...

What is the smallest way to store a UUID that is human readable?

What is the smallest way to store a UUID that is human readable and widely database compatible? I am thinking a char array of some sort using hex values? ...

Generating unique and opaque user IDs in Google App Engine

I'm working on an application that lets registered users create or upload content, and allows anonymous users to view that content and browse registered users' pages to find that content - this is very similar to how a site like Flickr, for example, allows people to browse its users' pages. To do this, I need a way to identify the user ...

Subsonic3 & GUIDs

I have a table with a PrimaryKey that is set as uniqueidentifier (GUID) and it's autopopulated using the newsequentialid() function from sql server 2008... When I insert a row manually, everything works as normal. But when I insert the record using the subsonic class and the repository the GUID column defaults to all zero's and the dat...

Are GUIDs good passwords?

Pros: I can't remember "good" passwords anyway so remembering them is not an issue. they don't look like passwords they are darn near impossible to guess (128 bits of entropy) easy to generate (offloads the "good PRNG" problem) Cons: ??? In particular; what about for passwords that computers enter like for databases logins on som...

Why is a GUID is the best choice for a PK if you're going to be doing replication?

I'm building an intranet web app with an Oracle back end. The Oracle DB will be replicated on another server for reasons that aren't important to this discussion. I'm reasonably certain we'll be using Oracle Basic Replication, not Advanced. Can someone explain to me why most discussions around Primary Keys go something like: Use of ...

IQueryable, Where, Guid and

I'm working my way through the MVC Storefront code and trying to follow the path of a repository, a service and a model that is a poco, outside of the dbml/data context. It's pretty easy to follow actually, until I started writing tests and things failed in a way I just don't understand. In my case, the primary key is a uniqueidentifier...

how to create random folder names 12 characters long in .NET

I would like to create random folder names on my website to store images and their thumbnails, but instead of using the full version of a generated guid, i was thinking about using just part of it, maybe just the first 8 characters and possibly base64 encode it. i am worried about possible collisions though. Can someone point me in the...

DataTable Select() with Guids

I am trying to boild my treeview at runtime from a DataTable that is returned from a LINQ query. The Fields returned are: NAME = CaseNoteID | ContactDate | ParentNote TYPE = Guid | DateTime | Guid The ParentNote field matches a entry in the CaseNoteID column. The Select(filter) is giving me a runtime error of Cannot find col...

How to predict the next GUID from a given GUID?

Hi, i have sent 10000 mails to our customers and each mail had a link of the format http://example.com/LogIn?key={guid} unfortunately the guid i sent were random guids (test data generated by Guid.NewGuid()) so the customers have all received invalid links... based on the 404s i receive from the webserver i have a few guids that i sent...

C# Linq Guid Anonymous Type Problem

Hello, I have a linq query which returns the ID of a question based on the questions text. This ID is then needed to be used to relate a date in a date table to that particular question. The question is already stored and the date is stored at a different time. The problem is that the query returns the questionID as an anonymous type a...

GUID vs INT IDENTITY

I'm aware of the benefits of using a GUID, as well as the benefits of using and INT as a PK in a database. Considering that a GUID is in essence a 128 bit INT and a normal INT is 32 bit, the INT is a space saver (though this point is generally moot in most modern systems). In the end, in what circumstances would you see yourself using a...

Is there COM exposure for Direct3D 10

Gentlemen and esteemed ladies. I posted this question in the COM forum at Code Project and got a snotty reply so hopefully you will be more helpful. I see that Microsoft has a COM library for Direct3D 9 exposed with GUID 81BDCBCA-64D4-426d-AE8D-AD0147F4275C. Has Microsoft exposed Direct3D 10 on COM and if so, what is the interface GUI...