Hi HeidiSQL team! I really appreciate your work, 5mb for a convenient SQL browser that's what we all need. I'm using Heidi SQL for ~3 years and I donated at some point; will do it again.
Heidi throws an exception, offering to continue/restart the application, after I
- made a connection to MS SQL;
- worked with it;
- hibernated / made the Windows 7 sleep;
- pushed POWER button to unhibernate / wake up;
- clicked on any table in Heidi to see it's content, or "run query" in a tab I left prior to sleep;
the exception shows up, and the healing method is
- disconnect from MS SQL
- or close HeidiSQL/ open again
Could you please fix this?
it's just looking at the exception at query execution, and if connection was already established by user but the TCP socket was closed by OS (that has just woke up / un-hibernated) - set up the same connection again and continue query execution.
I know HeidiSQL is written in Delphi; logically (C# pseudo-code) it would look like this:```
try {
try {
dbConnectionAbstraction.executeQuery_andFillDrid_withResultSet(query);
} catch (Exception ex) {
if (dbConnectionAbstraction.UserClickedLogIn and dbConnectionAbstraction.Connected = false) {
try {
dbConnectionAbstraction.Connect();
dbConnectionAbstraction.executeQuery_andFillDrid_withResultSet(query);
} catch (Exception ex2) {
throw ex2;
}
}
throw ex;
} catch (Exception ex3) {
// show the dialog with continue/restart application
}
Thank you very much!
Pavel C