Android Question freeze app to close JDBC driver

rkxo

Active Member
Licensed User
Hi,
when i try close connection with JDBC driver freeze app. Can i force async close?.

I tried this code but the app still frozen. Any idea?
B4X:
Dim Mh2 as jsql
    Mh2.Initialize2("com.mysql.jdbc.Driver","jdbc:mysql://"& IniServer&":"& IniPort &"/"& IniDB & "?zeroDateTimeBehavior=convertToNull", ""& IniUser &"", ""& IniPassword &"")
            ActBarText.Text=Trans.GetText("110")& IniDB.ToUpperCase & ")"
If Mh2.IsInitialized Then
Wait For(CloseCon) Complete (Result As Int)
End If
Sub CloseCon () As ResumableSub
Mh2.Close ' this point frozen
    Return True
  
End Sub
Thanks
 

rkxo

Active Member
Licensed User
thanks erel,
yes, in my application I works with InitializeAsync, but to give you the example I have set the sync.
i think that the problem is that any resultset its open.I use a single connection for all the queries.Then,can i force to close or kill a connection without having to close all the resultset?
close socket?
 
Last edited:
Top