Hi everyone,
I'm facing a weird problem using DBUtils.ExecuteSpinner. I use it in other parts of my projects without a problem. The weird behaviour is the following (both spinner are initialized as Spn1.Initialize("") at Activity_Create sub). They are loaded with data from two different tables both of them populated. In other parts of the project the very same statements work flawlessly. In the following point I can reproduce two different strange behaviours. I've followed all the code in DBUtils too, the strangest thing is that table are queried correctly, so I can see DBUtils load right values from SQLite DB, but after exiting the sub the spinners are loaded weirdly: in one case the first one is loaded with second one data while the second one is empty; if I move DBUtils.ExecuteSpinner at the end of sub both of them are loaded with second one data. Am I doing something really wrong?
Thank you.
Raffaele
I'm facing a weird problem using DBUtils.ExecuteSpinner. I use it in other parts of my projects without a problem. The weird behaviour is the following (both spinner are initialized as Spn1.Initialize("") at Activity_Create sub). They are loaded with data from two different tables both of them populated. In other parts of the project the very same statements work flawlessly. In the following point I can reproduce two different strange behaviours. I've followed all the code in DBUtils too, the strangest thing is that table are queried correctly, so I can see DBUtils load right values from SQLite DB, but after exiting the sub the spinners are loaded weirdly: in one case the first one is loaded with second one data while the second one is empty; if I move DBUtils.ExecuteSpinner at the end of sub both of them are loaded with second one data. Am I doing something really wrong?
B4X:
modifica=False
nuovo=True
lvApiari.Enabled=False
spn2.Clear
spn1.Clear
ScrollView1.Panel.LoadLayout("BigPanel")
ScrollView1.Panel.Height=altpannello
ScrollView1.FullScroll(False)
pnlAnagrafica.enabled=True
btnSave.Text="Salva"
sbForza.Value=5
lblValForza.Text="5"
DBUtils.ExecuteSpinner(Main.SQL, "SELECT DESC FROM TABLE2 ORDER BY ID", Null, 0, spn2)
DBUtils.ExecuteSpinner(Main.SQL, "SELECT TYPE FROM TABLE1 ORDER BY ID", Null, 0, spn1)
Raffaele