hello everyone...
from B4J
from a page which name is 'liste' which contains rows of data from a sqlite database, I send the following command:
where lblid0.text is an ID from a table
Now, in the page which name is 'saisie' which receives the 'callsubdelayed2' I have this little code:
But I have a big problem: extracting the row from the table, I want to fill all the texfields but they remain empty even after having initalization.
Did I miss something ?
from B4J
from a page which name is 'liste' which contains rows of data from a sqlite database, I send the following command:
page 'liste':
public Sub lblmodifier0_MouseReleased (EventData As MouseEvent)
'modifier une saisie..retourner à saisie
If lblid0.Text="" Then Return
Dim x As Int=lblid0.Text
B4XPages.ShowPage("saisie")
B4XPages.ShowPageAndRemovePreviousPages("saisie")
CallSubDelayed2(page_saisie,"modifierSaisie",x)
End Sub
where lblid0.text is an ID from a table
Now, in the page which name is 'saisie' which receives the 'callsubdelayed2' I have this little code:
page 'saisie':
public Sub modifierSaisie(id0 As Int)
Sleep(5)
initialiserLesChamps' initialization of the texfields
preparerDatabase' preparing the sqlite database
synt="SELECT * FROM depenses WHERE id=" & id0
Dim res As ResultSet=sql.ExecQuery(synt)
txtdate0.Text=res.GetString("date")'not filled
txtdatev.Text=res.Getint("datev")'not filled
txtlieu.Text=res.GetInt("idlieu")'not filled
txtmagasin.Text=res.GetInt("idmagasin")'not filled
txtsecteur.Text=res.GetInt("idsecteur")'not filled
txtarticle.Text=res.getstring("article")'not filled
txtmontant.Text=res.GetDouble("montant")'not filled
txtmoyen.Text=res.GetInt("idmoyen")'not filled
txtrem.Text=res.GetString("remarque")'not filled
Log(res.GetString("date") & ":" & res.Getint("datev") & ":" & _
res.GetInt("idlieu") & ":" & res.GetInt("idmagasin") & " voilà")'here the log is ok
End Sub
But I have a big problem: extracting the row from the table, I want to fill all the texfields but they remain empty even after having initalization.
Did I miss something ?