Android Question Reading record(s) with HTTPUtils2

AlpVir

Well-Known Member
Licensed User
Longtime User
Using HTTPUtils2 are able to read a single record (consisting of 2 fields L1 and L2) of an archive MSAccess that resides in the web. I use the following statement ASP 3.0 :

B4X:
rs.Open "SELECT L1, L2 FROM T WHERE TabbC = '" & strT & "'", cnn
response.write rs ("L1") & "#" & rs ("L2")

From the B4A side then I can easily separate L1 and L2.

If, however, there are more records I can write (ASP side) a loop :

B4X:
do
  response.write rs ("L1") & "#" & rs ("L2")
  response.write "@"
  rs.MoveNext
loop until rs.eof

I use the field separator # and the record separator @.
From the B4A side are I equally able to separate the fields of all records.

B4A side 1
B4X:
  Dim Job As HttpJob
   Job.Initialize("Job", Me)
   Job.Download2(Site & "/ReadMDB.asp", _
  Array As String("T", T))

B4 side 2
B4X:
Sub JobDone (Job As HttpJob)
    If Job.Success = True Then
        OutputX = Job.GetString
        Msgbox (OutputX,"")
    End If
End Sub

Is there any method more efficient and elegant ?

Thanks in advance
 
Last edited:
Top