sentences:  Then he studied law, was admitted to the bar in 1823, and commenced practice in Elmira, New York.Gray was elected as a Democrat to the 25th United States Congress, and served from March 4, 1837, to March 3, 1839.He was Judge of the Sixth Judicial District from 1846 to 1847.