guid

TextWriterTraceListener and trace filenames with GUIDs

I use TextWriterTraceListener (System.Diagnostics) in my application to trace several things like exceptions,... The application is running on a terminal server and if there are many users using it simultaneously the listener starts to create many tracefiles with random GUIDs in the filename. Are there possibilities or workarounds to ...

Is Guid considered a value type or reference type?

Hi folks, Guids are created using the new keyword which makes me think it's a reference type. Is this correct? Guid uid = new Guid(); Are Guids stored on the heap? ...

AssemblyInfo.cs: Is there any point in specifying a Guid when using ComVisible(false)?

When you create a new C# project in Visual Studio, the generated AssemblyInfo.cs file includes an attribute specifying an assembly GUID. The comment above the attribute states that it is used "if this project is exposed to COM". None of my assemblies contain types which need to be visible to COM, so I have marked my assembly with [assem...

How to sort GUID's the SQL Server way using Delphi

In a project I am working on it would be nice if I can sort an in memory list of guids and compare against a SQL server table ordered by these same guids. Unfortunately when an ordered list is returned by SQL Server, the order is not immediately apparent. What would be the best way to sort this in memory list so that the order is the ...

Data localization in SQL Server with GUIDs or...?

I need to make a database that is highly localized. For almost all entities I need a translation to 5+ languages. Some entities even require and additional resource localized (like images which I enter as paths). The question now is: 1: LOOKUP TABLE PER ENTITY/TABLE (kinda bloated schema?) should I create a "Localized" localization lo...

How create an unique 20 single byte token/key/ID on php?

I need to create a token/key to use it as a number order, so this should be unique, the tokens must be something like "6X990742MG185953R" so we can use it like a barcode, e. http://barcodes4.me/barcode/c128b/6X990742MG185953R.png We can't use UUID or GUID because is to long, the much closer we are is this: function uuid64() { $uuid ...

Nhibernate Guid with PK MySQL

Hello colleagues. I've got a question. I use NHibernate with MySql. At my entities I use Id(PK) for my business-logic usage and Guid(for replication). So my BaseDomain: public class BaseDomain { public virtual int Id { get; set; } public virtual Guid Guid { get; set; } public class Properties { public const str...

Change interface guids of COM DLL (ressource patch)

I have to build OEM versions of a COM library (DLL). Does anyone know a tool (ressource hacker) which may replace some of my interface guids after build time? I just want to build and test one DLL and generate the OEM versions afterwards. ...

Why GUID is returned as empty?

Hi, After loading an entity from the database using LINQ-to_SQL,I pass the entity.ID(the value is GUID after loaded from the db) to a method having argument of type GUID.When I access this parameter in the method,I get an empty value,and not the GUID.Why is it so? public sub DoSomething( ByVal userID As System.Guid) So, when I pass e...

How to delete the GUID folders from the drive(Temp folders created for installation)

Hi all, After installing .NET versions, 3.0 and 3.5 on my system, dummy or temp folders are created. These folder names are with the GUID. I want those temp/guid folders to be deleted automatically after the .NET installation. I have tried using the following in cmd line cmd: C\XXX\XXXX\dotnetfx35.exe /q /nobackup /norestart. As far as ...

How are session identifiers generated?

Most web applications depend on some kind of session with the user (for instance, to retain login status). The session id is kept as a cookie in the user's browser and sent with every request. To make it hard to guess the next user's session these session-ids need to be sparse and somewhat random. The also have to be unique. The quest...

fast way for finding GUIDs.

hi. I have lots(+2000) of GUIDs(in some network class) and my program must find one of them when it receives a message and do the job associated with it. the positive point is i have a hard-code generator, but the fastest way is my goal(and i don't know how to implement it). my code should do something like this: switch(received guid...

Cannot embed interop types from assembly "...\Microsoft.Search.Interop.dll" because it is missing the GuidAttribute attribute

Hello all, I get this error when adding a reference to the Microsoft.Search.Interop.dll library in a new project that I created. Microsoft.Search.Interop.dll is a library that provides some useful API to communicate with Windows Search. I use it in order to add a folder to the system indexer. Did anybody else get this error, and if so...

How can I get the GUID from a PDB file?

Hello, Does anyone know how to get the GUID from a PDB file? I'm using Microsoft's Debug Interface Access SDK http://msdn.microsoft.com/en-us/library/f0756hat.aspx and getting E_PDB_INVALID_SIG when passing in the GUID i expect when trying to load the PDB. I'd just like to know the GUID of the PDB so I can be certain that it's mism...

LINQ to SQl updating primary key field?

I have a linq to sql table/class that uses a GUID as both a primary key and as foreign key. This problem came up when factoring some code that previously worked. The exception generated is "Operation is not valid due to the current state of the object." The process I use is as such: aspnet_User user() = new aspnet_User(); aspnet_use...

Sequential (comb) GUIDs for Oracle

We are in the process of switching from the C# Guid.NewGuid() random-ish guid generator to the sequential guid algorithm suggested in this post. While this seems to work well for MS SQL Server, I am unsure about the implications for Oracle databases, in which we store guids in a raw(16) field. Does anyone have any insight as to whether t...

Pre-generating GUIDs for use in python?

I have a python program that needs to generate several guids and hand them back with some other data to a client over the network. It may be hit with a lot of requests in a short time period and I would like the latency to be as low as reasonably possible. Ideally, rather than generating new guids on the fly as the client waits for a re...

SQL Server database with clustered GUID PKs - switch clustered index or switch to sequential (comb) GUIDs?

We have a database in which all the PKs are GUIDs, and most of the PKs are also the clustered index for the table. We know that this is bad (due to the random nature of GUIDs). So, it seems there are basically two options here (short of throwing out GUIDs as PKs altogether, which we cannot do (at least not at this time)). We could chan...

How Random is System.Guid.NewGuid()? (Take two)

Before you start marking this as a duplicate, read me out. The other question has a (most likely) incorrect accepted answer. I do not know how .NET generates its GUIDs, probably only Microsoft does, but there's a high chance it simply calls CoCreateGuid(). That function however is documented to be calling UuidCreate(). And the algorithm...

how to enter values in rowguid column?

can anyone please tell me the right way to insert values in the rowguid column of the table? I m using sql server management studio ...