Sub ExecSql(flow As String,sqls As String)
If (sqls="") Then Return
Dim sq As SQL' = DB.pool.GetConnection 'get a DB connection (change DB to Main)
Try
sq.InitializeSQLite(File.DirApp, "gsmgateway.db3", False)
'sq.Initialize2("com.mysql.jdbc.Driver", "jdbc:mysql://" & db_host & "/data1?characterEncoding=utf8",db_account,db_passwd)
sq.BeginTransaction
sq.ExecNonQuery(sqls)
sq.TransactionSuccessful
Log("sql:" & flow)
Catch
If LastException.IsInitialized Then
Log("sql:" & flow & ",Exp:"&LastException.Message)
Else
Log("sql:" & flow & ",Exp:Err")
End If
End Try
End Sub