|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to convert 'System.String' to 'System.Guid'prm = new SqlParameter("@passkey", SqlDbType.UniqueIdentifier);
prm.Value = stringvalue; I got this exception Invalid cast from 'System.String' to 'System.Guid' -- Arne Garvander (I program VB.Net for fun and C# to get paid.) prm.Value = new Guid(stringvalue);
Show quote "Arne Garvander" <ArneGarvan***@discussions.microsoft.com> wrote in message news:ACDE0382-BBD1-4AC8-9D99-55445B9F6F49@microsoft.com... > prm = new SqlParameter("@passkey", SqlDbType.UniqueIdentifier); > prm.Value = stringvalue; > I got this exception > Invalid cast from 'System.String' to 'System.Guid' > -- > Arne Garvander > (I program VB.Net for fun and C# to get paid.) |
|||||||||||||||||||||||