This is a randomized, double-blind, double-dummy, placebo and active-controlled (glimepiride), multi-center, parallel-group study to investigate the effect of JTT-851 on HbA1c and other ancillary efficacy parameters and to assess the safety, tolerability, and pharmacokinetics of JTT-851 in inadequately-controlled treatment-naïve or metformin-treated type 2 diabetic patients.