'...
Wait For(connectToSql(dblocation,mysql_dbname,mysql_user,mysql_pass)) Complete (sql As SQL)
sql1 = sql
connectedToSql = sql <> Null
Log("is connected to mysql: " & connectedToSql)
'...
Public Sub connectToSql(dbloc As String, dbn As String, user As String, pass As String) As ResumableSub
Try
Dim userPool As ConnectionPool
userPool.Initialize(mysql_driver, $"${mysql_jdbc1}${dbloc}/${dbn}${mysql_jdbc2}"$,user,pass)
userPool.GetConnectionAsync("sql1")
Wait For sql1_ConnectionReady (Success As Boolean, sql As SQL)
If Success Then Return sql Else Return Null
Catch
Log(LastException)
Return Null
End Try
End Sub