Connecting multiples spinners to multiple tables using Httputils?

itpeligo

New Member
Licensed User
Longtime User
Good Day,

First time Poster

I'm able to connect to MS SQL server via the httputils by I was wondering how can I connect 3 spinners to 3 different tables within the same database and either populate at the same time or use the same serverurl call

For exmaple i want each spinner to connect to a different table see below spinner names

SpinnerName connect to Name Table
SpinnerCountry connect to Country Table
SpinnerCity connect to City Table

Thanks in advance
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Note that it is recommended to use HttpUtils2 instead of HttpUtils.

You cannot really connect the spinner to a table. You should execute a query and then fill the spinner with the data. Check DBUtils. It has a ExecuteSpinner method that works with local databases. You can do something similar with the remote database.
 
Upvote 0

mc73

Well-Known Member
Licensed User
Longtime User
You can create a pseudo-query waiting for the answer from a new script at the server's side. The answer should have in its line's beginning, a number for e.g., corresponding to the spinner you wish to populate.

Example:

client's side query -> get all three spinners

server's side -> execute those three queries, fetch data to an array with 1,2,3 in every line's front.

client's side -> populate accordingly

Careful with this, escape appropriately, to avoid any sort of injections.
 
Upvote 0
Top