Calculating odds ratios and corresponding confidence intervals for exposures that have been measured using a continuous scale presents important limitations in the traditional practice of analytical epidemiology. Approximations based on linear models require making arbitrary assumptions about the shape of the relation curve or about its breakpoints. Categorical analyses generally have low statistical efficiency, and cutpoints for the categories are in most cases arbitrary and/or opportunistic. The use of logistic generalized additive models to calculate odds ratios does not require these assumptions and allows great flexibility and adequate statistical efficiency. Based on the asymptotic normality of the logarithm of the odds ratio, the authors propose the use of an approximate analytical expression for the corresponding covariance matrix, which will allow the construction of confidence intervals for odds ratios that can be interpreted as in the classical parametric context. The authors illustrate this procedure by examining the relation between glycemia and risk of postoperative infection, using data obtained from a cohort study of patients undergoing surgery in Santiago, Spain (January 1996--March 1997). The authors found that glycemia values below 75 mg/dl and above 130 mg/dl were associated with increased risk of postoperative infection.