I would be grateful if somebody can tell me what is wrong with my code. I get Success = True but not records in the DB. The AddNonQueryToBatch seems to be correct
I also tried
But I got an error message. I put it immediately after the Create statement
Thanks
B4X:
Main.SQL1.ExecNonQuery("DROP TABLE Test_Load")
Main.SQL1.ExecNonQuery("CREATE TABLE IF NOT EXISTS Test_Load(Close INTEGER)")
For i = 1 To 1000
Main.SQL1.AddNonQueryToBatch("INSERT INTO Test_Load VALUES (?)", Array(i))
Next
Dim SenderFilter As Object = Main.SQl1.ExecQueryAsync("SQL", "SELECT * FROM Test_Load", Null)
Wait For (SenderFilter) SQL_QueryComplete (Success As Boolean, rs As ResultSet)
If Success Then
Do While rs.NextRow
Log(rs.GetInt2(0))
Loop
rs.Close
Else
Log(LastException)
End If
I also tried
B4X:
Main.SQL1.ExecNonQuery("PRAGMA journal_mode = wal")
But I got an error message. I put it immediately after the Create statement
Thanks