public static void test_guid() { string sConnString = "Data Source = KMAROIS\\SQLEXPRESS;Initial Catalog=sc;Trusted_Connection=Yes;"; string sValue = "A9DD08A4-94D8-4D93-BEC8-AE2ABA96AA0E"; SqlConnection oConnection = new SqlConnection(sConnString); SqlCommand oCommand = new SqlCommand(); oCommand.Connection = oConnection; oCommand.CommandText = "sp_IsValidUniqueId"; oCommand.CommandType = CommandType.StoredProcedure; SqlParameter oUniqueId = new SqlParameter("@UniqueId", SqlDbType.VarChar, 36); SqlParameter oIsValid = new SqlParameter("@IsValid", SqlDbType.TinyInt); oIsValid.Direction = ParameterDirection.Output; oUniqueId.Value = sValue; oIsValid.Value = 0; oCommand.Parameters.Add(oUniqueId); oCommand.Parameters.Add(oIsValid); oConnection.Open(); SqlDataReader oDataReader = oCommand.ExecuteReader(); }