New GUID(guidstring) fails to create GUID - Help Please!!!

  • Thread starter Thread starter Chris Ericoli
  • Start date Start date
C

Chris Ericoli

Hi,

This has me completely confused. Running vb.net - trying very simple call.
Being passed a string representing a guid, and need to create a sqlcommand
paramater as a guid from the string. code as follows:

AccountID = New System.Guid("{B308A429-1C3A-4D87-9185-E4E1926AEC32}")
Me.cmdFillList.Parameters("@entityid").Value = AccountID

If i then do a watch on AccountID.ToString, i get
00000000-0000-0000-0000-000000000000.

Please - any help would be fantastic, as this have got me stumped.

Cheers

Chris
 
Strip out the "{" and "}"

Thomas Tomiczek
THONA Software & Consulting Ltd.
(Microsoft MVP C#/.NET)
 
Back
Top