Sub SetValue (tbl As B4XTable, RowId As Long,value As String)
tbl.sql1.ExecNonQuery2($"UPDATE data SET ${column.SQLID} = ? WHERE rowid = ?"$, Array As String(value, RowId))
'updates the specific cell data
B4XTable1.Refresh
End Sub
note
column is b4xtable column
value is data to be passed
Make sure you define the column that you want to update.
B4X:
'Define column
Private Amount As B4XTableColumn
'Initialize column
Amount=B4XTable1.AddColumn("Amount", B4XTable1.COLUMN_TYPE_text)
Then this how it will be
B4X:
Sub SetValue (tbl As B4XTable, RowId As Long,value As String)
tbl.sql1.ExecNonQuery2($"UPDATE data SET ${Amount.SQLID} = ? WHERE rowid = ?"$, Array As String(value, RowId))
'updates the specific cell data
B4XTable1.Refresh
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.