Sample Code
Set the string value of a column in a RowSet:
// rs is a RowSet with a column called “ProductName”:
Try
rs.EditRow
rs.Column(“ProductName”).StringValue = “Generic Widgets”
rs.SaveRow
Catch error As DatabaseException
MsgBox("DB Error: " + error.Message)
End Try
?Sample Code???
???Commit(),???
I’m not sure what you’re asking, but you would commit your changes by calling CommitTransaction on the database connection. So if you have a global property called DB that is connected to the database, you do this:
DB.CommitTransaction
I guess i had same question fom a student that was trying to learn Xojo, so if commit is mandatory , it would be nice to add full sample in the docs at least.
Generally speaking a commit is not mandatory unless you started your own transaction. But these things vary from DB to DB.
It’s not necessary to call db.commit. However, it is necessary to have the primary key column in the recordset to be able to use rs.editRow.