When is a GUID not a GUID?

[edited] I want a GUID, and can't seem to make one! My code should convert a string to a GUID; but the resulting GUID is always empty. Here's my code with an actual GUID string thatfails: Private_userGuidAsString="d5774e1e-b3c4-4f2f-9d1e-c2d9e03df61d" Private_gGuidAsGuid _gGuid = New Guid(_userGuid)... Stopping on the next line, I examine _gGuid, and it's Empty. , geosync _gGuid = New Guid(_userGuidStr) i think you have o change that line to : _gGuid = New Guid(_strGuidStr) , I don't get any exceptions either. Just an empty Guid. , Yes , The new Guid will looks empty in debug , but its not ! You can get its value by calling its .ToString() method , dim GuidValue as string= YourGuidInstance.ToString() You can also use the GuidGen tool which generate a guids string for you , to add the tool to vs , go to Tools->Eternal Tools -> Add , for the command value use : C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\guidgen.exe

Posted On: Friday 2nd of November 2012 07:33:47 AM Total Views:  493
View Complete with Replies

Related Messages:

Why is my generic.list of guid not filling   (214 Views)
Hi Guys, I have the following function, with the key part being ParticipantsAlreadyInvitedList.Add(NewGuid(InvitedParticipants.DataKeys(i).Value.ToString))'("ParticipantID").Value,System.Guid)) The whole thing looks like this:Function CreatedInvitedParticipantsList() As Generic.List(Of Guid) Dim i As Integer = 0 For Each InvitedParticipantsRow As GridViewRow In InvitedParticipants.Rows ParticipantsAlreadyInvitedList.Add(NewGuid(InvitedParticipants.DataKeys(i).Value.ToString))'("ParticipantID").Value,System.Guid)) i = i + 1 Next Return ParticipantsAlreadyInvitedList End Function Unfortunately my List is emtpy, it get the objects and the list is growing but the objects in it are empty, so after e.g. i=3 I have a list of length (2) but, all elements are empty.
italian guide   (207 Views)
Where I can found a guide in italian
APIguide,Jason,John,Randy,Jan   (213 Views)
Thanks But, the downloaded API-guide wont work on my machine. My operating system is XP-proff/with SP2 installed. The error.mess. is: Run time error '5' Wrong Procedure or arguments. from Asger..
can't start ALLAPI API guide   (369 Views)
Hi I've reinstalled my Windows XP including the VB6 development system. works well except the API guide: When I launch API-Guide.exe I get nothing but a run time error '5' Invalid procedure call or argument. It has been installed ... study guides are the best for IT exams with 100% passing guarantee   (324 Views) study guides are the best for IT exams with 100% passing guarantee...
Anyone look into this and guide me to complete   (288 Views)
Have a good day, Hi friends i tried to create a VB macro for some process, i create the macro which fails to run Task: Word document have some content and references in (n) numbers. need to create the macro to check the First name of the Referal author would present inside the content or not. (Similar to Alt+F process) But the number of references and Referal publication Occurance in word is variable. Example Document: References 1) Check the Reference publishers with the document content and displayed it has References displayed Example References: Bakshi JN, Chandru D, Durga P. 1989. Situated cognition and the culture of learning. Educ Res 18:3242. Content: It may be that there are some perceptions of preparedness that can never be fully addressed until the new doctor has had the opportunity to undertake the task for real, and to succeed at it. Evidence from the qualitative data collected as part of this study (Illing et al. 2008b) suggests that this final explanation may be particularly important as the lack of opportunity to gain exposure to the realities of the work of a new doctor does seem to be a key factor in preparedness which may be enhanced through greater opportunities for situated learning and legitimate peripheral participation >>>(Bakshi et al. 1989; Lavi & Warner 1991; Mani 2002)
Complete Noob! in need of guidance   (308 Views)
Ok i have been given a activity in my computing class that to be honest is really getting me down im a noob and have only been programming for about 6 weeks now Before i carry on i would like too state "This is what i have done i do not wish for you too doo this work for me but guide me on the parts im missing" Module Module1 Sub Main() Dim x As Integer, y As Integer, s As Char x = 4 s = "%" y = 3 Displaysymbols(x, y, s) End Sub Sub displaysymbols(ByRef x As Integer, ByRef y As Integer, ByRef s As Char) Dim i As Integer For i = 1 To x Console.Write(s) Next Console.WriteLine() For i = 1 To y Console.WriteLine(s) Next End Sub End Module This i what i have basically my aim is too have the symbol "s" in this case displayed in a rectangle of "x" width and "y" height when i start it on the console app its basically that but not filled in if that makes sense can guide me on what i may be doing wrong here
need some guidance please   (448 Views)
Im on Programing class and the proffesor just went Hardcore on us and told us to do a program and didnt explained well enough for all of us to understand it. Recently we were working with list box and output box- did one recently that Ask for a Password in order to continue with the program, and after that it tells me all the information after i hit the button i designed for process. ------------------------------------------------------------------------------------ now im kinda lost cause he want the same format but instead of asking you for a password , he wants the program to ask for a number and then do an While that says - While counter>10 counter=counter+1 and then some value- value= number/2 and then Comes the If He wants the program to print pair numbers from 1-10 ------------------------------------------------------------------------------------ Im Kind of lost not cause of the programing - just the way you have to organize it for it to work . If someone is kind enough to understand the problen and throw me a and id be gladly aprecciated
project guidance need in Visual Basic   (275 Views)
we were not taught about vsual basic but asked to prepare project with the help of VB, ms-access. with which we are unfamilar. please! guide me in this regeard. rather i don't know how to start with vb language
noob needs guidance   (242 Views)
Am just learning vb rather than put code behind command button, am trying to incorporate a timer control on first form, hopefully then automatically move to the next form where user will login program requires two users to login see what ive coded so far the password bit works fgine its the first form and timer that I havent yet been taught frmPrivate Sub cmdStartup_Click() Timer1.Enabled = True End Sub Private Sub Timer1_Timer() End Sub Private Sub cmdLogin_Click() Dim password(1) As String password(0) = InputBox("Please enter your password", "Password 1") password(1) = InputBox("Please enter your password", "Password 2") If password(0) = "disney" And password(1) = "elmer" Then MsgBox "Conratulations You have logged in successfully", vbInformation, "Password 1 Correct" Else MsgBox " Sorry one or more Passwords is incorrect, Please try again", vbInformation, "Access denied" End If End Sub Can aynone tell me how to incorporate a timer on to a startup form, which will then jump to login form