I have the following code to put cities in a menu, there are multiple Nulls in the row that I need to exclude.
But because "i" also counts when a Null passes by, my Sender is no longer correct.
How can I solve this?
see picture
But because "i" also counts when a Null passes by, my Sender is no longer correct.
How can I solve this?
see picture
B4X:
SQl.Initialize(File.DirRootExternal, Main.dato, False)
intCount = SQl.ExecQuerySingleResult("SELECT COUNT(*) FROM museum WHERE city IS NOT NULL")
Log(intCount)
Dim curr As Cursor
curr = SQl.ExecQuery("SELECT city, naam FROM museum ORDER BY city <> Null Asc")
For i = 0 To intCount -1
curr.Position = i
naam = curr.GetString("city")
If naam <> Null Then
bm(i) = naam
Log(i)
Log(bm(i))
'''' Dim content As String = $""$
'''' CLV1.Add(CreateItem(CLV1.AsView.Width, naam, naam, content), "")
End If
Next