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...
 

DonManfred

Expert
Licensed User
Longtime User
Hiding the error is a great help for us!
 
Upvote 0
Top