Daniel,
I'm not sure. When I test a form in VFP and it crash, the datasession stay opened. I just go in it and close all tables in there which make the datasession close. So, I'm not sure it will work for you but have you tried closing all tables in it.
Also, why do you want to close the datasession?
Diane Robitaille eng.