How to convert 'System.String' to 'System.Guid'
prm = new SqlParameter("@dotnet.itags.org.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);
"Arne Garvander" <ArneGarvander@.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.)
Labels: ado, cast, convert, exception, invalid, net, passkey, prm, sqldbtype, sqlparameter, stringvalue, uniqueidentifier, value, ystemguid, ystemstring
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home