wwsql::Commit

Commits a SQL transaction.

o.Commit(lcTransactionName)

Parameters

lcTransactionName
Optional name of the transaction - allows to nest transactions and individually commit the nested transaction named.

Example

loSql = CREATEOBJECT("wwSql")
loSql.Connect("database=WebStore")

loSql.BeginTransaction("order")

IF loSql.ExecuteNonQuery("Insert into Orders ... ") == -1 OR ;
   loSql.ExecuteNonQUery("Update Customers ...") == -1
   loSql.Rollback("order")
   RETURN
ENDIF

loSql.Commit("order")

See also:

Class wwsql

© West Wind Technologies, 2023 • Updated: 01/29/17
Comment or report problem with topic