I am using the following in JobDone to retrieve data:
This returns:
What I an attempting to achieve is to read each row of result.Tag = "not sent"
Then call getFBtopic(MyCity).
So, my output to Log should be:
Something is querky with my For Each ...... Next Statement
B4X:
If result.Tag = "not sent" Then 'query tag
For Each records() As Object In result.Rows
MyID = (records(result.Columns.Get("id")))
MyCity = (records(result.Columns.Get("city")))
MyProduct1 = (records(result.Columns.Get("product1")))
Log("Not Sent: " & MyID & " " & MyCity & " " & MyProduct1)
Log("Gotcha")
getFBtopic(MyCity)
Next
End If
If result.Tag = "get fbtopic" Then 'query tag
For Each records() As Object In result.Rows
MyTopic = (records(result.Columns.Get("username")))
Log("Topic: " & MyTopic)
Next
End If
This returns:
B4X:
Waiting for debugger to connect...
Program started.
HandleJob: 8
Not Sent: 35 Centurion Life Policy
Gotcha
Not Sent: 36 Centurion Life Policy
Gotcha
Not Sent: 37 Centurion Life Policy
Gotcha
HandleJob: 1
Topic: 0822206575
Topic: 0742355566
HandleJob: 0
Topic: 0822206575
Topic: 0742355566
HandleJob: 0
Topic: 0822206575
Topic: 0742355566
What I an attempting to achieve is to read each row of result.Tag = "not sent"
Then call getFBtopic(MyCity).
So, my output to Log should be:
B4X:
Not Sent: 35 Centurion Life Policy
Gotcha
Topic: 0822206575
Topic: 0742355566
Not Sent: 36 Centurion Life Policy
Gotcha
Topic: 0822206575
Topic: 0742355566
Not Sent: 37 Centurion Life Policy
Gotcha
Topic: 0822206575
Topic: 0742355566
Something is querky with my For Each ...... Next Statement