Search Results

Search found 1232 results on 50 pages for 'guid'.

Page 3/50 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • SQL SERVER GUID vs INT Your Opinion

    I think the title is clear what I am going to write in your post. This is age old problem and I want to compile the list stating advantages and disadvantages of using GUID and INT as a Primary Key or Clustered Index or Both (the usual case). Let me start a list by suggesting [...]...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Dynamic Linq Library Guid exceptions

    - by Adan
    I am having a problem with the Dynamic Linq Library. I get a the following error "ParserException was unhandled by user code ')" or ','". I have a Dicitionary and I want to create a query based on this dictionary. So I loop through my dictionary and append to a string builder "PersonId = (GUID FROM DICTIONARY). I think the problem is were I append to PersonId for some reason I can't seem to convert my string guid to a Guid so the dynamic library don't crash. I have tried this to convert my string guid to a guid, but no luck. query.Append("(PersonId = Guid(" + person.Key + ")"); query.Append("(PersonId = " + person.Key + ")"); I am using VS 2010 RTM and RIA Services as well as the Entity Framework 4. //This is the loop I use foreach (KeyValuePair<Guid, PersonDetails> person in personsDetails) { if ((person.Value as PersonDetails).IsExchangeChecked) { query.Append("(PersonId = Guid.Parse(" + person.Key + ")"); } } //Domain service call var query = this.ObjectContext.Persons.Where(DynamicExpression.ParseLambda<Person, bool>(persons)); Please help, and if you know of a better way of doing this I am open to suggestions.

    Read the article

  • Determine which active directory object is referred to by GUID in a Directory Synchronization Error Report

    - by Michael Shimmins
    We have active directory syncronization setup between our on-premises AD server and Microsoft hosted Exchange (business productivity online services). I've started getting a daily error report, which details an error for a specific AD user, however it references it by GUID. I can't find any info on how to translate that object guid into something meaningful so I can find and fix the problem. The error is reported as: Error 005: Unable to set the alias for this object in Microsoft Online Services because either the primary SMTP address, the e-mail nickname, or the SAM account name in the local Active Directory contains an invalid character. in reference to the Object GUID: CN={8443cbb4-5199-49f0-9529-ce965430dca6} How can I translate that object guid into a friendly object name?

    Read the article

  • What is the most efficient way to encode an arbitrary GUID into readable ASCII (33-127)?

    - by mark
    Dear ladies and sirs. The standard string representation of GUID takes about 36 characters. Which is very nice, but also really wasteful. I am wondering, how to encode it in the shortest possible way using all the ASCII characters in the range 33-127. The naive implementation produces 22 characters, simply because 128 bits / 6 bits yields 22. Huffman encoding is my second best, the only question is how to choose the codes.... Any more ideas? Thanks. P.S. The encoding must be lossless, of course.

    Read the article

  • GUID type in database

    - by 5YrsLaterDBA
    GUID is not an official data type in database. In our existing SQL Server design, the Uniqueidentifier type is used for GUID value. Now we are switching to Sybase database. Should we use varchar(36) to replace that Uniqueidentifier type? I am still confused by GUID. I was told GUID is 16 bytes long but its character string is 36 characters in length. I must missed something.

    Read the article

  • How to cast a STRING to a GUID

    - by GIbboK
    Hi, I need cast a String to a Guid. I am using this code but string myUserIdContent = ((Label)row.FindControl("uxUserIdDisplayer")).Text; Guid myGuidUserId = new Guid(myUserIdContent); // PROBLEM HERE MembershipUser mySelectedUser = Membership.GetUser(myGuidUserId); I receive this error Exception Details: System.FormatException: Unrecognized Guid format. ANy other ways to do it? thanks

    Read the article

  • Converting a GUID to System.Drawing.Imaging.ImageFormat

    - by Kjensen
    I store information about images in a database - also their ImageFormat (jpeg, png etc). Console.WriteLine(System.Drawing.Imaging.ImageFormat.Jpeg.Guid); Outputs: b96b3cae-0728-11d3-9d7b-0000f81ef32e I want to store this in the database as a GUID - and read from the database and get the associated ImageFormat. How do I cast the GUID b96b3cae-0728-11d3-9d7b-0000f81ef32e to System.Drawing.Imaging.ImageFormat.Jpeg.Guid ?

    Read the article

  • Read assembly Guid

    - by ggonsalv
    Is it possible to read the GUID from the Assembly without actually loading it in the current App Domain. Normally Assembly.Load loads the DLL into the app domain. I just want to read the value. The description of the GUID is 'The following GUID is for the ID of the typelib ' if this project is exposed to COM <Assembly: Guid("DEDDE61CD-928E-4ACD-8C25-3B8577284819")>

    Read the article

  • How to call a .NET COM method with an array from delphi using PSafeArray?

    - by Sebastian Godelet
    Hello. I have an .NET (4.0) interface which is implemented with a ServicedComponent COM+ class: interface DotNetIface { void MethodRef(var System.Guid guid); void MethodArray(System.Guid[] guids, params object[] parameters); void MethodCStyle([MarshalAs(UnmanagedType.LPArray, ArraySubType=UnmanagedType.Struct, SizeConst=5)]System.Guid[] guids); } Now I used the Delphi 2007 import wizard to import the type library, and as expected I get the following signatures: procedure MethodRef(var guid : TGuid); procedure MethodArray(guids : PSafeArray); procedure MethodCStyle(var guids : ClrGuid /* from mscorlib_TLB */); If i now call the "ref" method like this it works fine: procedure CallByRef(guid : TGuid); var test : TGuid; begin test := ... comRef.MethodRef(guid); end; Now I also need the array method procedure CallArray(); var localGuid : TGuid; arrayVariant : OleVariant; begin arrayVariant := VarArrayCreate([0,4], varVariant /* dont know here */); arrayVariant[0] := localGuid; /* compile error, cannot cast implicitly */ comRef.MethodArray(PSafeArray(TVarData(arrayVariant.VArray)), /* here this object... PSafeArray works actually*/); end; Now lastly i tried with a c array procedure CallCStyle(); var localGuid : TGuid; arrayOfGuid : array [0..4] of ClrGuid; begin arrayOfGuid[0] := ClrGuid(localGuid); comRef.MethodCStyle(PSafeArray(/* now i dont know put it*/, /* here this object... PSafeArray works actually*/); end; I seriously dont know how to make this work. I hope someone has more experience with COM marshalling thx Side node: I found VT_CLSID which i think can be passed for SafeArrayCreate, but I am not sure how to sue that

    Read the article

  • Wrong EFI System Partition GUID?

    - by artificer
    On a new GPT initialized disk (second PC disk) I created a FAT32 partition using gparted. I want to use it as an EFI System Partition so I flagged it as boot. After that I checked the UUID using the gparted “partition information” option and it reported: 09B1-97A5. As far as I understand it should be C12A7328-F81F-11D2-BA4B-00A0C93EC93B. I also checked my running operative system disk (Ubuntu 14) and found that Gparted reports EB78-9AD2 for my actual boot partition UUID. What exactly is gparted reporting as UUID on my EFI system partition and why it doesn’t match with the expected C12A7328-F81F-11D2-BA4B-00A0C93EC93B ID?

    Read the article

  • Scalable way to store files on server (PHP)?

    - by Nathaniel Bennett
    I'm creating my first web application - a really simplistic online text editor. What I need to do is find the best way to store text based files - a lot of them. These text files can be past 10,000 words in size (text words not computer words.) in essence I want the text documents to be limitless in size. I was thinking about storing the text files in my MySQL database - but thought there was a better way. Instead I'm planing on storing the text files in XML based format in a directory on my server. The rows in the database define the name of the xml based text file and the user who created the text along with basic metadata. An ID is generated using a V4 GUID generator , which gives the text an id and stores the text in the "/store" directory on my server. The text definitions in my server contain this id, and the android app I'm developing gets the contents of the text file by retrieving the text definition and then downloading the text to the local device using the GUID in the text definition. I just think this is a botch job? how can I improve this system? There has been cases of GUID colliding. I don't want this to happen. A "slim" possibility isn't good enough - I need to make sure there is absolutely no chance in a GUID collision. I was planning on checking the database for texts that have the same id before storing the text with a particular id - I however believe with over 20,000 pieces of text in my database this would take an long time and produce unneeded stress on the server. How can I make GUID safe? What happens when a GUID collides? The server backend is going to be written in PHP.

    Read the article

  • protobuf-net: incorrect wire-type exception deserializing Guid properties

    - by Paul Smith
    I'm having issues deserializing certain Guid properties of ORM-generated entities using protobuf-net. Here's a simplified example of the code (reproduces most elements of the scenario, but doesn't reproduce the behavior; I can't expose our internal entities, so I'm looking for clues to account for the exception). Say I have a class, Account with an AccountID read-only guid, and an AccountName read-write string. I serialize & immediately deserialize a clone. Deserializing throws an Incorrect wire-type deserializing Guid exception while deserializing. Here's example usage... Account acct = new Account() { AccountName = "Bob's Checking" }; Debug.WriteLine(acct.AccountID.ToString()); using (MemoryStream ms = new MemoryStream()) { ProtoBuf.Serializer.Serialize<Account>(ms, acct); Debug.WriteLine(Encoding.UTF8.GetString(ms.GetBuffer())); ms.Position = 0; Account clone = ProtoBuf.Serializer.Deserialize<Account>(ms); Debug.WriteLine(clone.AccountID.ToString()); } And here's an example ORM'd class (simplified, but demonstrates the relevant semantics I can think of). Uses a shell game to deserialize read-only properties by exposing the backing field ("can't write" essentially becomes "shouldn't write," but we can scan code for instances of assigning to these fields, so the hack works for our purposes). Again, this does not reproduce the exception behavior; I'm looking for clues as to what could: [DataContract()] [Serializable()] public partial class Account { public Account() { _accountID = Guid.NewGuid(); } [XmlAttribute("AccountID")] [DataMember(Name = "AccountID", Order = 1)] public Guid _accountID; /// <summary> /// A read-only property; XML, JSON and DataContract serializers all seem /// to correctly recognize the public backing field when deserializing: /// </summary> [IgnoreDataMember] [XmlIgnore] public Guid AccountID { get { return this._accountID; } } [IgnoreDataMember] protected string _accountName; [DataMember(Name = "AccountName", Order = 2)] [XmlAttribute] public string AccountName { get { return this._accountName; } set { this._accountName = value; } } } XML, JSON and DataContract serializers all seem to serialize / deserialize these object graphs just fine, so the attribute arrangement basically works. I've tried protobuf-net with lists vs. single instances, different prefix styles, etc., but still always get the 'incorrect wire-type ... Guid' exception when deserializing. So the specific questions is, is there any known explanation / workaround for this? I'm at a loss trying to trace what circumstances (in the real code but not the example) could be causing it. We hope not to have to create a protobuf dependency directly in the entity layer; if that's the case, we'll probably create proxy DTO entities with all public properties having protobuf attributes. (This is a subjective issue I have with all declarative serialization models; it's a ubiquitous pattern & I understand why it arose, but IMO, if we can put a man on the moon, then "normal" should be to have objects and serialization contracts decoupled. ;-) ) Thanks!

    Read the article

  • insert into sql table column as GUID

    - by loviji
    I have tried with ado.net create table columnName with unique name. as uniquename I use new Guid() Guid sysColumnName = new Guid(); sysColumnName = Guid.NewGuid(); string stAddColumn = "ALTER TABLE " + tableName + " ADD " + sysColumnName.ToString() + " " + convertedColumnType + " NULL"; SqlCommand cmdAddColumn = new SqlCommand(stAddColumn, con); cmdAddColumn.ExecuteNonQuery(); con.Close(); and it fails: System.Data.SqlClient.SqlException: Incorrect syntax near '-'. ? System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) ? System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) now question, how can i fix it, or how can use different way to create unique column?

    Read the article

  • Read assembly Guid without locking the DLL in an appdomain in medium trust ASP.Net

    - by ggonsalv
    Is it possible to read the GUID from the Assembly without actually loading it in the current App Domain. Normally Assembly.Load loads the DLL into the app domain. I just want to read the value. The description of the GUID is 'The following GUID is for the ID of the typelib ' if this project is exposed to COM <Assembly: Guid("DEDDE61CD-928E-4ACD-8C25-3B8577284819")> The main thing is I don't want to lock the file so that there are no errors 'Another process is accessing the file' error.

    Read the article

  • How to retrieve the GUID for Yahoo's Contacts API

    - by Jack Marchetti
    I'm attemping to use the Yahoo Contacts API to add an "invite your friends" feature on a site I'm building. I've found the correct web service to call (http://social.yahooapis.com/v1/user/{guid}/contacts) but it is asking for the user's GUID, not their username/password. I've searched, and am unable to find a "lookup" feature through the Yahoo API which lets me get the user's guid from their username/password. Does anyone have any experience with the Contacts API. I've reaad over the documentation, and looked at YQL as well, but I still haven't found how to get the user's guid. Thanks guys.

    Read the article

  • EF 4.0 Guid or Int as A primary Key

    - by bigb
    I am Implementing custom ASPNetMembership using EF 4.0 Is there any reason why i should use Guid as a primary key in User tables? As far as i know Int as a PK on SQL Server more performanced than strings. And Int is easier to iterate. Also, for security purpose if i need to pass this it id somewhere in url i may encrypt it somehow and pass it like a strings with no probs. But if i want to use auto generated Guid on SQL Server side using EF 4.0 i need to do this trick http://leedumond.com/blog/using-a-guid-as-an-entitykey-in-entity-framework-4/ I can't see any cases why i should use Guid as PK, may be only one if system going to have millions ans millions users, but also, theoretically, Guid could be duplicated sometime isn't so? Anyway Int32 size is 2,147.483.647 it is pretty much even for very-very big system, but if this number is still not enough I may go with Int64, in that cases I may have 9,223.372.036.854.775.807 rows. Pretty much huh? From another hand, M$ using Guids as PK in their ASPNetMembership implementation. [aspnetdb].[aspnet_Users] - PK UserId Type uniqueidentifier, should be some reasons/explanation why the did it?! May be some one has any ideas/experience about that?

    Read the article

  • WP_Insert_Post and GUID Issue [Wordpress]

    - by morningglory
    Hello, I have a posting form at my theme. I used wp_insert_post there. My code looks like this $post = array( 'ID' => '', 'post_author' => $post_author, 'post_category' => $post_category, 'post_content' => $post_content, 'post_title' => $post_title, 'post_status' => 'publish', ); $post_id = wp_insert_post($post); $fullpost = get_post($post_id); wp_redirect($fullpost->guid); Everything works fine. But when it's inserted to the database, at the GUID field, the entry format is like this permalinks_structure/id. So if my permalinks_structure is like /category/id , it become like http://www.example.com/uncategorized/1. So the problem is, if i post through wordpress admin panel, GUID of the post is http://www.example.com?p=1 . So my post database GUID become mess, because if i want to change permalinks_structure , the post which becomes from outside form will follow the structure. What I want to do is, I want to get the GUID like that I posted through admin panel which is http://www.example.com?p=1 How can i do it ? Please point me out. Thank you.

    Read the article

  • Hyper-V: determine the guest's name given the GUID

    - by syneticon-dj
    How would I go about determining the guest's name given its GUID or vice-versa, preferably with only the Hyper-V/Server Core stock install at hands? Rationale: I am in favor of having a repository of dirty tricks to revert to when in great need. To immediately quiesce all (storage) operations of a VM guest without losing the state, I used to run kill 17 <all VM's virtual processes> (signaling SIGSTOP) and resumed afterwards using kill 19 <all VM's virtual processes> (signaling SIGCONT) in ESXi/vSphere shell. I tried the same technique with Hyper-V using Process Explorer's "Suspend" functionality on the vmwp.exe processes and it seemed to work. I have yet to find a way for easily identifying the processes to suspend, though - the vmwp command line is only listing a GUID.

    Read the article

  • A couple of questions about NHibernate's GuidCombGenerator

    - by Eyvind
    The following code can be found in the NHibernate.Id.GuidCombGenerator class. The algorithm creates sequential (comb) guids based on combining a "random" guid with a DateTime. I have a couple of questions related to the lines that I have marked with *1) and *2) below: private Guid GenerateComb() { byte[] guidArray = Guid.NewGuid().ToByteArray(); // *1) DateTime baseDate = new DateTime(1900, 1, 1); DateTime now = DateTime.Now; // Get the days and milliseconds which will be used to build the byte string TimeSpan days = new TimeSpan(now.Ticks - baseDate.Ticks); TimeSpan msecs = now.TimeOfDay; // *2) // Convert to a byte array // Note that SQL Server is accurate to 1/300th of a millisecond so we divide by 3.333333 byte[] daysArray = BitConverter.GetBytes(days.Days); byte[] msecsArray = BitConverter.GetBytes((long) (msecs.TotalMilliseconds / 3.333333)); // Reverse the bytes to match SQL Servers ordering Array.Reverse(daysArray); Array.Reverse(msecsArray); // Copy the bytes into the guid Array.Copy(daysArray, daysArray.Length - 2, guidArray, guidArray.Length - 6, 2); Array.Copy(msecsArray, msecsArray.Length - 4, guidArray, guidArray.Length - 4, 4); return new Guid(guidArray); } First of all, for *1), wouldn't it be better to have a more recent date as the baseDate, e.g. 2000-01-01, so as to make room for more values in the future? Regarding *2), why would we care about the accuracy for DateTimes in SQL Server, when we only are interested in the bytes of the datetime anyway, and never intend to store the value in an SQL Server datetime field? Wouldn't it be better to use all the accuracy available from DateTime.Now?

    Read the article

  • How secure are GUIDs in terms of predictability?

    - by ssg
    We're using .NET's Guid.NewGuid() to generate activation codes and API keys currently. I wonder if that poses a security problem since their algorithm is open. .NET Guid uses Win32 CoCreateGuid and I don't know it's internals (possibly MAC address + timestamp?). Can someone derive a second GUID out of the first one, or can he hit it with some smart guesses or is the randomness good enough so search space becomes too big? Generating random keys have the problem of collision, they need a double check before adding to a database. That's why we stuck with GUIDs but I'm unsure about their security for these purposes. Here are the 4 consecutive UUIDGEN outputs: c44dc549-5d92-4330-b451-b29a87848993 d56d4c8d-bfba-4b95-8332-e86d7f204c1c 63cdf958-9d5a-4b63-ae65-74e4237888ea 6fd09369-0fbd-456d-9c06-27fef4c8eca5 Here are 4 of them by Guid.NewGuid(): 0652b193-64c6-4c5e-ad06-9990e1ee3791 374b6313-34a0-4c28-b336-bb2ecd879d0f 3c5a345f-3865-4420-a62c-1cdfd2defed9 5b09d7dc-8546-4ccf-9c85-de0bf4f43bf0

    Read the article

  • Sequential (comb) GUIDs for Oracle

    - by Eyvind
    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 this algorithm would be good for creating sequential guids for Oracle as well as for MS SQL Server, or if a different variant should be used. Thanks!

    Read the article

  • UUID collision risk using different algorithms

    - by Diego Jancic
    Hi Guys, I have a database where 2 (or maybe 3 or 4) different applications are inserting information. The new information has IDs of the type GUID/UUID, but each application is using a different algorithm to generate the IDs. For example, one is using the NHibernate's "guid.comb", other is using the SQLServer's NEWID(), other might want to use .NET's Guid.NewGuid() implementation. Is there an above normal risk of ID collision or duplicates? Thanks!

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >