OrWolf
MIS
- Mar 19, 2001
- 291
I'm attempting to pass a GUID to a SQL statement however first I figured that I needed to change it from a string back into a GUID. I'm attempting to use the ConvertGuid to do this but I'm getting the following error.
Error:
System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
at System.Guid..ctor(String g)
at System.ComponentModel.GuidConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
at System.ComponentModel.TypeConverter.ConvertFrom(Object value)
Relevent code:
Dim gExamID As New Guid("B80D56EC-5899-459d-83B4-1AE0BB8418E4"
gExamID = System.ComponentModel.TypeDescriptor.GetConverter(gExamID).ConvertFrom(Me.txtExamID.Text)
The value of me.txtExamID.Text is: 9bb796c4-9c77-47d6-b47d-221d62d9e778
Any assistance or pointers would be greatly appreciated. Thanks!
Error:
System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
at System.Guid..ctor(String g)
at System.ComponentModel.GuidConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
at System.ComponentModel.TypeConverter.ConvertFrom(Object value)
Relevent code:
Dim gExamID As New Guid("B80D56EC-5899-459d-83B4-1AE0BB8418E4"
gExamID = System.ComponentModel.TypeDescriptor.GetConverter(gExamID).ConvertFrom(Me.txtExamID.Text)
The value of me.txtExamID.Text is: 9bb796c4-9c77-47d6-b47d-221d62d9e778
Any assistance or pointers would be greatly appreciated. Thanks!