Sub Class_Globals
Private Root As B4XView
Private xui As XUI
Private dbsrv As String="xx.xx.xx.xx"
Private dbusername As String="xx_xx"
Private dbpwd As String= "xx"
Private sql As SQL
End Sub
Public Sub Initialize
' B4XPages.GetManager.LogEvents = True
End Sub
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainPage")
End Sub
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
Private Sub Button1_Click
'xui.MsgboxAsync("Hello world!", "B4X")
sql.InitializeAsync("Oracle", "oracle.jdbc.driver.OracleDriver", $"jdbc:oracle:thin:@${dbsrv}:1521:mmjd"$, dbusername, dbpwd)
If sql.IsInitialized Then
'xui.MsgboxAsync("Oracle Connected Success!!","Success")
Log("connection success") ==> The msg coming when I click the button second or Thrice
End If
sql.Close
End Sub