Dim nret As Integer = 1000 Dim cmd As New SqlCommand("sp_CountSRStockforDups") cmd.CommandType = Data.CommandType.StoredProcedure ' OutPut Parameter cmd.Parameters.Add("@myRowCount", Data.SqlDbType.Int).Direction = Data.ParameterDirection.Output nret = CType(cmd.Parameters("@myRowCount").Value, Integer)