Home » U++ Library support » U++ SQL » MySqlSession Close and Reconnect crashes Application (Reconnect crashes on newer Upp Version (CLANG) but works on older (Mingw))
Re: MySqlSession Close and Reconnect crashes Application [message #55764 is a reply to message #55732] |
Fri, 11 December 2020 11:11   |
 |
mirek
Messages: 14266 Registered: November 2005
|
Ultimate Member |
|
|
Alboni wrote on Thu, 03 December 2020 19:55If you closed the session yourself you need to do a normal Connect() I think, not a Reconnect.
Reconnect is for when the session lost the connection from a network error etc. When that happens MySqlSession::WhenReconnect callback is activated.
The default behaviour is to call MySqlSession::Reconnect(), but you can set it to your own function from which you can call MySqlSession::Reconnect()
That is correct, this was the intention of Reconnect. That said, expecting that you can call Reconnect after Close makes sense too, so I have plugged all holes (well, there was actually just one, in Cancel) to make possible, with one catch: Close unsets global SQL session (and that is probably correct behaviour), so you need to assign it again after Reconnect ("SQL = session").
Mirek
|
|
|
Goto Forum:
Current Time: Sat Jul 19 04:34:50 CEST 2025
Total time taken to generate the page: 0.03704 seconds
|