Ex-date is the date on which a company start executing a particular corporate action and it could result the change in the share price.
Record date is the Date on which company make the list of their shareholders to give benefit of the announced action. In india it takes 2 days to settle the shares in the account. So an invester must have to buy the shares 2 days earlier of the ex-date to get benefit of the announced action.
What is shares buyback
A company can buy back its own shares from shareholders. This is done when the company believes that the price of its shares are too low and it is time to increase the price.
Share buybacks may also be done by a company's board of directors authorizing management to repurchase some number of shares in the open market over a certain period of time. The main reason for companies buying back their own stock is that, in general, it increases the value of remaining stocks and thus benefits shareholders.