Chance constrained programming is an effective and convenient approach to control risk in decision making under uncertainty. However, due to unknown probability distributions of random parameters, the solution obtained from a chance constrained optimization problem can be biased. In practice, instead of knowing the true distribution of a random parameter, only a series of historical data, which can be considered as samples taken from the true (while ambiguous) distribution, can be observed and stored. In this paper, we develop exact approaches to solve stochastic programs with Data-driven Chance Constraints (DCCs). For a given historical data set, we construct two types of confidence sets for the ambiguous distribution through nonparametric statistical estimation of its moments and density functions. We then formulate DCCs from the perspective of robust feasibility, by allowing the ambiguous distribution to run adversely within its confidence set. By deriving equivalent reformulations, we show that stochastic programs with DCCs under both moment-based and density based confidence sets can be solved effectively. In addition, we derive the relationship between the conservatism of DCCs and the sample size of historical data, which shows quantitatively what we call the value of data.