It could be many things, Fuel supply/pressure, bad ground which would throw of the ecu, if you can keep it running is the check engine light on, check the codes if so. If you have a bad possibly shorted battery and a bad alternator or ground it would not stay running soooo I would get it started...