Thank you for the answers. After reading i have best focused my problem (that depens only on my lack of knowledge on httputils)
So:
i start with a data reading from web pages
whoisname= su.EncodeUrl(whocli.text, "UTF8")
req.InitializeGet("http://localhost/gestweb.php?secret=mypwd&name="&whoisname)
req.Timeout = 10000 'set timeout to 10 seconds
httpC.Execute(req, 1)
ProgressDialogShow("Retrieving data...")
This request works fine whith this code
Sub httpC_ResponseSuccess (Response As HttpResponse, TaskId As Int)
Dim result As String
positio=0
result = Response.GetString("UTF8")
File.WriteString(File.DirInternalCache, "scores.sco",result)
reader.Initialize(File.OpenInput(File.DirInternalCache, "scores.sco"))
Dim line As String
line = reader.ReadLine
Do While line <> Null
positio=line.IndexOf(";")
ClieSpinner.Add(line.SubString(positio+1))
idlistacliente.Add(line.SubString2(0,positio))
line = reader.ReadLine
positio=0
Loop
reader.Close
ProgressDialogHide
End Sub
My error i think has been this:
in the recording section i write
'recording
req.InitializeGet("http://localhost/rec_data.asp?secret=mypwd&idclie="&idcli&"&ragso="&encodedRagsoc&"&event="&encodedEvent&"¬e="&encodedNote&"&date_d="&dated&"&time_d="&timed&"&tecni="&usertec)
httpC.Execute(req, 1)
ProgressDialogShow("Recording...")
label2.Text="Ok"
using another time
so telling to code to resend TaskID = 1
I have modified the code in this
'recording
req.InitializeGet("http://localhost/rec_data.asp?secret=mypwd&idclie="&idcli&"&ragso="&encodedRagsoc&"&event="&encodedEvent&"¬e="&encodedNote&"&date_d="&dated&"&time_d="&timed&"&tecni="&usertec)
httpC.Execute(req, 2)
ProgressDialogShow("Recording...")
label2.Text="Ok"
and this
Sub httpC_ResponseSuccess (Response As HttpResponse, TaskId As Int)
If TaskId=1 Then
Dim result As String
positio=0
result = Response.GetString("UTF8")
File.WriteString(File.DirInternalCache, "scores.sco",result)
reader.Initialize(File.OpenInput(File.DirInternalCache, "scores.sco"))
Dim line As String
line = reader.ReadLine
Do While line <> Null
positio=line.IndexOf(";")
ClieSpinner.Add(line.SubString(positio+1))
idlistacliente.Add(line.SubString2(0,positio))
line = reader.ReadLine
positio=0
Loop
reader.Close
ProgressDialogHide
End If
If TaskId=2 Then
ProgressDialogHide
label2.Text="Data recorded."
End If
End Sub
And in this manner there is no error.
So is this the correct/best way or is possible to use a different approach to the problem.
Thank you again