How can I check database is opened?

:sign0085:Before I use "DataConnect.Open("Data Source = " & AppPath & "\cisa.sl3")" , How can I check whether database is opened or not?
 

Erel

Administrator
Staff member
Licensed User
It could only be opened if you already opened it. So you can use a global variable to save its state:
B4X:
Sub Globals
 DBOpened = false
End Sub
...
If DBOpened = false then
  DataConnect.Open(...)
  DBOpened = true
End If
 
Top