guid

SQL Server: Search all tables for a particular GUID

i came across the need to cleanse some data, and i need to find some particular guids (i.e. uniqueidentifiers) in SQL Server°. i've come up with a stored procedure that does a SELECT from every uniqueidentifier column in every table in the current database, and returns a result set if the guid is found. It uses the INFORMATION_SCHEMA v...

PID assignment policy in Windows / Using PIDs for naming temporary files

What is the PID assignment policy in Windows? Repeated runs of a process calling _getpid() indicates non sequential assignment (3548,3344,3628,2748,4872,2360). Given the observed non sequential assignment of PIDs, is it possible for two different process with the same pid to be executed closely in time from one another? Obviously the ...

Can I display GUID in windbg?

I am trying to debug some COM components and want to track down CLSID and IIDs in calls to CoCreateInstance. I am not sure how to display GUID in windbg. Any pointers for that. ...

How to replace all non-sequential GUIDs with sequential ones?

I have a brown-field SQL Server 2005 database that uses standard, unsorted GUIDs as the majority of the primary keys values and also in clustered indexes (which is bad for performance). How should I go about changing these to sequential GUIDs? One of the challenges would be to replace all of the foreign key values as I change each the ...

c# How to add a guid simpletype into a xml schema

Hey, I'm trying to create an xml schema, which enables an attribute value to be stored as an GUID in native format. I could set it up a string, but it would be nice to store it as a real GUID. Any ideas how to do it. regards scope_creep. ...

guid to base64, for URL

Question: is there a better way to do that? VB.Net Function GuidToBase64(ByVal guid As Guid) As String Return Convert.ToBase64String(guid.ToByteArray).Replace("/", "-").Replace("+", "_").Replace("=", "") End Function Function Base64ToGuid(ByVal base64 As String) As Guid Dim guid As Guid base64 = base64.Replace("-", "/").Re...

Using Guid as Id column in NHibernate causes format exception when using MySQL

When I define the NHibernate entity/mapping to use Guid as identity column I receive an exception. The Guid column is generated as a varchar(40), but the content seem to be binary. Is there a solution to this? For now I'm just using plain ol' int, but it would be nice to know for future projects! :) ...

How to hash a GUID and a 64-bit timestamp into another GUID

We're working with a proprietary database and have a table whose semantic compound key consists of a 128-bit GUID and a 64-bit timestamp. "Semantic compound key" in a sense that multiple records with the same GUID may occur in the table, as well as multiple records with the same timestamp; however the pair (GUID, timestamp) is unique. As...

Converting GUID to String

why doesn't this work? MsgBox("F6D8C47B-46E6-4E93-A393-00085ACA2242").ToString.Replace("-", "") ...

How do I generate GUID under Windows Mobile?

Is there a ready-to-use API (C / C++) in Windows Mobile ecosystem that I could use to generate a GUID? I am looking for simple one-shot API to do this. If there is a need to write a whole algorithm or use some extra 3rd-party modules, I will do away without this. Background. To display notification to the user I use SHNotificationAdd, w...

DataTable.Select("ColumnName IN ") Guid error

I'm having problems with a DataTable line, the idea is that I want to pull out of a series of rows any rows where one of the column values is in a set of guids. However, I'm getting a guid / string comparison error from the select() function. The code is as follows: Dim sb As New StringBuilder For Each Row As DataRow In dtData.Rows ...

Sending a Java UUID to C++ as bytes and back over TCP

I'm trying to send a Java UUID to C++, where it will be used as a GUID, then send it back and see it as a UUID, and I'm hoping to send it across as just 16 bytes. Any suggestions on an easy way to do this? I've got a complicated way of doing it, sending from Java to C++, where I ask the UUID for its least and most significant bits, wri...

Why is GUID attribute needed in the first place?

What is the necessity for the GUID attribute? why don't just let the compiler handle this automatically?! ...

Active Directory GUID

I need a unique GUID that never changes per user in active directory... I see objectguid, msExchMailboxGUID, attributesecurityguid but not sure which one to use. I think objectguid is what I want but I'm not positive. Any suggestions? ...

SQL Server GUID (from Active Directory) vs Int

We migrated a lot of data from our old ordering system. This system stored the users initials in our "Orders" table for each order they created. Now that we have a view that looks at active directory I would like to update those initials with the active directory objectguid (or something that references the guid). This would allow us to ...

How do I obtain/use LibUUID?

I'm trying to replace a call to ::CoCreateGUID so I can generate GUIDs in a C++ program on Linux. I understand that libuuid (http://linux.die.net/man/3/libuuid) supports this, and I've read this question (http://stackoverflow.com/questions/153676/guids-in-a-c-linux-gcc-app). I'm a bit new to Ubuntu/GCC/Linux, so I've started off like t...

Initializing a GUID variable

I am using VC++ 6.0 on Windows XP SP2 platform. I am using GUID structure in my code. typedef struct _GUID { // size is 16 DWORD Data1; WORD Data2; WORD Data3; BYTE Data4[8]; } GUID; How to initialize this structure to zeros while creating an object? Or when I create an object, what is the default value f...

Guids in Ruby

I have problem that is really easily solved with Guids. In particular, for a password reset workflow I would like to send a Guid token to a users email and have them reset their password using the token. Since guids are unique this is pretty secure and saves me emailing people passwords which is risky. I noticed there is one Guid gem...

Convert LPWSTR to GUID

I'm working with the new Windows 7 audio APIs, and I've hit a wall. Basically, I need to take an IAudioSessionControl2* and get an ISimpleAudioVolume* out of it. Now, it looks like I can call on IAudioSessionManager->GetSimpleAudioVolume() using the value of IAudioSessionControl2->GetSessionInstanceIdentifier(...). Note that this isn'...

ASP.Net Strange Guids

An ASP.Net application we have recently developed is creating what I believe to be non standard Guids. The Guids are being created using the .Net framework method Guid.NewGuid(). Here are some examples of the guids created: 00000000-0000-0000-210f-0160000000f6 00000000-0000-0000-c02b-0160030000fc 00000000-0000-0000-ca2b-0160030000fc 000...