I am trying to pass a uniqueidentifier parameter to a stored procedure using the following code:
myCommand.Parameters.Add("@BlogID", SqlDbType.UniqueIdentifier).Value = "96d5b379-7e1d-4dac-a6ba-1e50db561b04";
I keep getting an error however saying that the program was unable to convert from string to GUID. Am I passing the value incorrectly?
Value
to a string representation or a guid? – Wobble