B4J Question ResultSet Freeze application with MySQL and MSSQL

Swissmade

Well-Known Member
Licensed User
Longtime User
Hi,
I have a app where I have a connection to a Server.
This application is making a Backup of the data in real-time.

Now the problem.
When I lose the connection to the server and the Application is busy with Backup the Resultset of the Server-connection is freeze the application.
Is there a option to fetch this as a error. This way I can handle this.
Try Catch Block is not helping the application is frozen.

I hope somebody has any idea for this.
 

Swissmade

Well-Known Member
Licensed User
Longtime User
Have Try you option KeirS but it is not working.
Last option connection Pool
 
Upvote 0

Swissmade

Well-Known Member
Licensed User
Longtime User
Connectionpool is also not helping here.

Somehow this exception is not handle at all.
 
Upvote 0

Swissmade

Well-Known Member
Licensed User
Longtime User
Hi all
It seems to work I have do it with the code from KeirS
Working on MSSQL and Mariadb(MySQL)
B4X:
Sub IsValidConnection(SQLConnection As SQL) As Boolean
Dim JO As JavaObject
Dim TimeoutSecs As Int = 0
JO = SQLConnection
JO = JO.GetFieldJO("connection")
Return JO.RunMethod("isValid", Array As Object (TimeoutSecs))
End Sub

Many thanks for all your help.
 
Upvote 0

Swissmade

Well-Known Member
Licensed User
Longtime User
Problem SOLVED

After some more test I can say that this problem is not coming back for now.
 
Upvote 0
Top