Android Question Sqlite Append And Populate New Column

BitsAndBytes

Active Member
Licensed User
B4X:
Sub SQLITEUPDATE
   sqlMainDatabase.ExecNonQuery( "ALTER TABLE TABLE_LANGUAGE ADD COLUMN COL1 TEXT")
 
sqlMainDatabase.BeginTransaction
  Try
     For i = 1 To 10
     sqlMainDatabase.ExecNonQuery2("INSERT INTO TABLE_LANGUAGE (COL1) VALUES (?)", Array As String("Lang"))
    Next
     sqlMainDatabase.TransactionSuccessful
   Catch
    Log(LastException.Message)
   End Try
  sqlMainDatabase.EndTransaction
End sub

I want to to add a text field to an sqlite database and populate it with 10 string values, but this code return error...
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…