B4J Question SqlLite .NextRow not Required in B4J

MrKim

Well-Known Member
Licensed User
This has bit me a couple of times now. I have a number of places where I always return 1 row.
I am developing mostly in B4J now and then testing B4A.
in B4J the following works just fine
B4X:
Dim R As ResultSet = B4XPages.MainPage.SQL1.ExecQuery("SELECT Admin FROM Groups WHERE GroupName = '" & Group & "'")
If R.RowCount > 0 Then
    Log(R.GetInt2(0))
.
.
.

B4A MUST HAVE .NextRow
B4X:
Dim R As ResultSet = B4XPages.MainPage.SQL1.ExecQuery("SELECT Admin FROM Groups WHERE GroupName = '" & Group & "'")
If R.RowCount > 0 Then
    R.NextRow
    Log(R.GetInt2(0))
.
.
.

I know, my bad for leaving it out but when it fails in B4A it is always a WTF!!?? moment for those of us with no memory. Takes a while to figure out.
 
Top