Android Question Non correct extraction from SQLite (May be)

DALB

Member
Licensed User
Hello everyone,

In the code below, when I extract datas from a table, I find a special behaviour decribed here:
The log renders the good answers for two datas LAT and LON, but if I try to put them in two EditTexts, the result is 0.

Do I miss something ?

Dim synt As String
Dim Lcurs As ResultSet

'----------------------------------
synt="SELECT * FROM pev WHERE Villes = '" & ValVille & "'"
Lcurs= Starter.SQL1.ExecQuery(synt)
Lcurs.Position=0
'>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> HERE THE RESULT APPEARS AND IT's CORRECT
Log("Lcurs " & Lcurs.GetString("LAT")) ' 34
Log("Lcurs " & Lcurs.GetString("LON")) ' 69
'>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> HERE THE RESULT IS 0 FOR THE TWO EditTexts
txtLat.Text=Lcurs.GetString("LAT") ' 0
txtLon.Text=Lcurs.GetString("LON") ' 0
Thanks
 

Erel

Administrator
Staff member
Licensed User
Please use [code]code here...[/code] tags when posting code.

There is no way that the result will be different. The fields are probably updated somewhere else.
 

DALB

Member
Licensed User
Exact, Thanks !!!
An other processus works parallely !
Some days I'd rather to go fishing !
 
Top