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

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
 
T

Thomas Tomiczek \(MVP\)

Strip out the "{" and "}"

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top