Hi Erel,
Sorry for the delay but I had loads of changes to make to accommodate the few lines you have given me:
5 Activities, 2 code modules and 1 service...
It seems to be working as required!
I was busy writing code to store unwritten data when you replied.
The key was the Code Module containing the global SQL object.
"Thank you" to both you and Informatix.
I have included some of what I have done should anyone else have the same issues.
Code Module: (DBConnect.bas).
This is the complete code module .
Code:
Sub Process_Globals
Dim SQL1401 As SQL
End Sub
Sub InitSQL1401
SQL1401.Initialize(File.DirRootExternal, "SQL1401.db", True)
End Sub
Main:
Code:
If File.Exists(File.DirRootExternal, "SQL1401.db") = False Then
dbExists = False 'Flag
End If
...
If DBConnect.SQL1401.IsInitialized = False Then
DBConnect.InitSQL1401
End If
...
Service Module:
Code:
Sub Service_Create
If DBConnect.SQL1401.IsInitialized = False Then
DBConnect.InitSQL1401
End If
End Sub
Last edited: Jan 15, 2014
Kind regards
Gavin
Samsung GT-I5500, HTC Desire Z, Samsung Galaxy Note II / IV, Motorola Xoom II