Android Question Cannot assign void value

Enthousiastic

Active Member
Licensed User
Hello , i am using the following subs and i have the error cannot assign void value.



Sub FillTable

Dim Query As String

'Query="SELECT * FROM " & Main.DBTableName6

Curs = Main.SQL1.ExecQuery("SELECT * FROM " & Main.DBTableName6)

Curs=Main.SQL1.ExecQueryAsync("SQL" ,Query , Null )

End Sub

Sub SQL_QueryComplete (Success As Boolean, Crsr As Cursor)

If Success Then
For i = 0 To Crsr.RowCount - 1
Crsr.Position = i
Log(Crsr.GetInt2(0))
Next
Else
Log(LastException)
End If
End Sub


Can you tell me please where is the error ?

Many thanks entousiastic
 

MaFu

Well-Known Member
Licensed User
This line causes the error:
B4X:
Curs=Main.SQL1.ExecQueryAsync("SQL" ,Query , Null )
ExecQueryAsync() runs asynchronous (as the name imply) and have therefore no return value.
 
Top