Android Question callsub another object method

Hamied Abou Hulaikah

Well-Known Member
Licensed User
Longtime User
I have this in starter service:
B4X:
dim a as int=Starter.SQL1.ExecQuerySingleResult("select count(*) from products")
Starter.SQL1.ExecQuery2("select * from products where id=? and status=?",Array as String(1,0))
I want to call it with callsub:
B4X:
Dim a As Int=CallSub2("starter","SQL1.ExecQuerySingleResult","select count(*) from products")
CallSubDelayed3("starter","SQL1.ExecQuery2","select * from products where id=? and status=?",Array as String(1,0))
This code is not working! how can I write it?
 

DonManfred

Expert
Licensed User
Longtime User
Create a sub in the starter which does the job. Call this sub using callsub.

Start with understanding how CallSub, CallSub2 works and what happens here.
 
Upvote 0

Hamied Abou Hulaikah

Well-Known Member
Licensed User
Longtime User
I don't want to create a sub for it, I want to call it directly with callsub/callsub3 , is it possible? any idea?
 
Upvote 0
Top