I have a app that lose a DB object who was created en
B4X:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
'
Dim DBGps As SQL
'
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
'
Dim DBGps As SQL
B4X:
Sub Open_DataBase (Directorio As String, DBName As String)
Dim lcResult As Boolean
'
If File.Exists(Directorio, DBName) = True Then
' Se abre la Base de Datos
Main.DBGPS.Initialize(Directorio, DBName, False)
If Main.DBGPS.IsInitialized = True Then
You have declared ' DBGps ' but then appear to Initialize ' DBGPS '.
Also on last line you then initialize DBGPS and immediately test if it is initialized ?