B4J Question SQLite and resultset

rodmcm

Active Member
Licensed User
Longtime User
In B4a I use ResultSet to capture a database Table, I then eliminate the information in the Table, reconfigure and store it in the same Table, with alterations using the data in the ResultSet.

Works fine.

B4X:
    rsSorted = Starter.SQL.ExecQuery(Query)
    SQLGeneral.DeleteDataSQLTable(Starter.SQL,"SORTEDTERMS")                    ' Deletes the old data

B4X:
'Generalised sub to Delete all items from Table
'Does not delete the Table
Sub DeleteDataSQLTable(SQL As SQL,DBname As Object)
    'Log("Delete data from SQLDB")
    Dim Query As String = "DELETE FROM " & DBname
    SQL.ExecNonQuery(Query)
End Sub

If I try this with B4j then rsSorted has no data at all after the delete of the database

Why would this be so?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…