Mashiane Expert Licensed User Longtime User Aug 4, 2016 #1 Hi there I'm using the kvs class in my project. I'm able to save and retrieve records however after an hour of inactivity in my app and the app resumes, the kvs cannot be read and raises an error of CantOpenDatabase: specified directory or database does not exist. The database path is declared as a variable in a module. I have updated the class to include this method.. Code: Copy private Sub CheckOpen If sql1.IsInitialized = False Then Initialize(MasterDir,MasterFile) End If End Sub This method is supposed to test if the db is still alive and if not initializes it, however the Initialize call does not compile. I'm still baffled as to why is this. It says it expects a "," but that is there already. Perhaps I'm missing something.. Can someone please advise me here.. Attachments KeyValueStore.bas KeyValueStore.bas 7 KB · Views: 432
Hi there I'm using the kvs class in my project. I'm able to save and retrieve records however after an hour of inactivity in my app and the app resumes, the kvs cannot be read and raises an error of CantOpenDatabase: specified directory or database does not exist. The database path is declared as a variable in a module. I have updated the class to include this method.. Code: Copy private Sub CheckOpen If sql1.IsInitialized = False Then Initialize(MasterDir,MasterFile) End If End Sub This method is supposed to test if the db is still alive and if not initializes it, however the Initialize call does not compile. I'm still baffled as to why is this. It says it expects a "," but that is there already. Perhaps I'm missing something.. Can someone please advise me here..
Erel B4X founder Staff member Licensed User Longtime User Aug 5, 2016 #2 This is exactly the purpose of the Starter service. kvs should be a process global variable in the Starter service and it should be initialized in Service_Create sub. Upvote 0
This is exactly the purpose of the Starter service. kvs should be a process global variable in the Starter service and it should be initialized in Service_Create sub.
Mashiane Expert Licensed User Longtime User Aug 5, 2016 #3 Erel said: This is exactly the purpose of the Starter service. kvs should be a process global variable in the Starter service and it should be initialized in Service_Create sub. Click to expand... Thanks Erel, let me play around... Upvote 0
Erel said: This is exactly the purpose of the Starter service. kvs should be a process global variable in the Starter service and it should be initialized in Service_Create sub. Click to expand... Thanks Erel, let me play around...
Mashiane Expert Licensed User Longtime User Aug 5, 2016 #4 Erel said: This is exactly the purpose of the Starter service. kvs should be a process global variable in the Starter service and it should be initialized in Service_Create sub. Click to expand... Why is it that I cannot call the Initialize method inside another method within then same class as in my CheckOpen method above? The ide is giving me an error. Upvote 0
Erel said: This is exactly the purpose of the Starter service. kvs should be a process global variable in the Starter service and it should be initialized in Service_Create sub. Click to expand... Why is it that I cannot call the Initialize method inside another method within then same class as in my CheckOpen method above? The ide is giving me an error.