Hello
I have a few thoughts not knowing much about your car. Please read about the "coolant sensor" it could be a part of this problem.
Coolant Sensor
The water temperature sensor communicates information to and from the computer. If this has failed to work properly, it would definitely create issues like the one you described. Before we condemn the sensor let's make sure the coolant level is correct and the antifreeze is properly mixed. The antifreeze should be 50-50 one part antifreeze and the other part water. If the mixture is wrong, it could affect the sensor. Most people do not pay enough attention to this little device, which can give you many problems. Learn more about Coolant Sensors, Click on the link provided below...
http://www.mightyautoparts.com/pdf/articles/tt67.pdf
COOLANT SYSTEMS Take a look at the LINK provided below. You will learn exactly how to back-flush your engine and you can also view a presentation on how the coolant system works.
http://www.diynetwork.com/diy/cda/article_print/0,1983,DIY_13808_2270919_ARTICLE-DETAIL-PRINT,00.html
Another Thought!
We sometimes give advice without having any background information to work with. A good preventive maintenance program will reduce most common problems and reduce the amount of things that could go wrong.
Before we get deep into the problem itself, we have to be sure that all the routine maintenance has been performed on schedule, oil changes, tune-ups and other related maintenance. Both the air filter and fuel filter should be replaced at least once per year. If this has not been done, I recommend looking into this first. The air filter can get dirty causing a rich mixture and a dirty fuel filter will reduce fuel-flow and eventually allow dirt to enter the fuel system. The coolant level and the condition of the coolant plays an important role in today's engines. The coolant sensor delivers information to the computer and if the sensor does not get the right information due to contaminated anti-freeze, low level or otherwise the message will not arrive thus resulting in engine failure.
The battery connections should be cleaned periodically, both the battery posts and terminals. You should also check the condition of the drive belts. I personally change the belts every two years, they tend to dry out and slip if not renewed.
We should also think about any work done lately, which could have lead to this problem. It could have been mechanical or bodywork, something could have been left loose or disconnected as a result of such work.
In your case, I would make sure that all of the required maintenance is up to date. A good preventive maintenance program will reduce unnecessary repairs and save you money.
Good Luck!
Dan
Automotive Management
36 Plus Years of Direct Automotive Experience