H Hamied Abou Hulaikah Well-Known Member Licensed User Longtime User Jul 20, 2020 #1 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?
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 Jul 20, 2020 #2 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
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.
H Hamied Abou Hulaikah Well-Known Member Licensed User Longtime User Jul 20, 2020 #3 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
I don't want to create a sub for it, I want to call it directly with callsub/callsub3 , is it possible? any idea?
DonManfred Expert Licensed User Longtime User Jul 20, 2020 #4 HAH said: I want to call it directly with callsub/callsub3 , is it possible? Click to expand... You can call a SUB with this Commands (check documentation of these Keywords). Yes. You can not raise any other Code using this Commands. Upvote 0
HAH said: I want to call it directly with callsub/callsub3 , is it possible? Click to expand... You can call a SUB with this Commands (check documentation of these Keywords). Yes. You can not raise any other Code using this Commands.