2. How to update multiple tables with multiple fields using dbutils.UpdateRecord ? Of course need to check for any dberrors while updating the values ? ie should rollback all the updates if any errors occurs.
To update multiple fields of the same record(s), just use:
B4X:
' updates multiple fields in a record
' in the Fields map the keys are the column names
Public Sub UpdateRecord2(SQL As SQL, TableName As String, Fields As Map, WhereFieldEquals As Map)
Based on the criteria exposed in the WhereFieldEquals, the above will update a set of records (from zero to n).
You could copy (and rename) any function you find in DbUtils; once it's in your code module you can extend, modify, put logs..