The railway authorities said there were almost 200 people on the train when the accident happened in Nakhon Ratchasima province, northeast of Bangkok. Dozens were injured.