Android Question DBRequestManager to many Activities

cristian petersen

Member
Licensed User
Longtime User
Hello,

I just started to use B4A 6 days ago. I read too much information here and I am trying to absorb all. I am creating an app with various Activities in each one I need to retreive data from my SQL Server using RDC. My question is: Do I have to declare Dim reqManager As DBRequestManager in Sub Global in every Activity, or just one in Main in Process_globals ? Same question for JobDone, one for each Activity or a unique with all the different tags?

Thank you for your help.
 

incendio

Well-Known Member
Licensed User
Longtime User
No (to all questions). Note that Sub Globals should only be used for UI objects.

You should use a single service to manage all the requests. You can call activities from the service with CallSub or CallSubDelayed. You can use the starter service for this.
What are the benefits to put DBRequest in a single service compared to declared it on each activity?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
less code. Only one place to handle
 
Upvote 0
Top