Public SQL1 As SQL
(...)
Public SQLDataBasePath As String
Public SQLDataBaseName As String
SQLDataBasePath = File.DirApp
SQLDataBaseName = "myDataBaseSQLite.db"
#If B4J
SQL1.InitializeSQLite(SQLDataBasePath, SQLDataBaseName, True)
#Else If B4A OR B4I
SQL1.Initialize(SQLDataBasePath, SQLDataBaseName, True)
#End If
' ******************************************************
' *************** SUGGERITO DALL'IDE ***************
' ******************************************************
SQL1.BeginTransaction
Try
'block of statements like:
For i = 1 To 1000
SQL1.ExecNonQuery("INSERT INTO table1 VALUES(...)
Next
SQL1.TransactionSuccessful
Catch
Log(LastException.Message)
SQL1.RollBack 'no changes will be made
End Try
' ************************************************************************************
' *************** QUI NON VIENE SUGGERITO SQL1.EndTransaction ***************
' ************************************************************************************