Partager via


MAKETRANSACTABLE( ) Function

Allows a free table or free cursor to support transactions.

MAKETRANSACTABLE([nWorkArea | cAlias])

Parameters

  • nWorkArea
    Specifies the work area of the table or cursor for which transactions will be supported.

  • cAlias
    Specifies the alias of the table or cursor for which transactions will be supported.

Return Value

Logical. Returns a logical true (.T.) if MAKETRANSACTABLE( ) was able to make the free table or cursor support transactions, otherwise a logical false (.F.) is returned.

Remarks

A free table is a table that has not been added to a database with the ADD TABLE Command. A free cursor is a cursor that is created from a free table or with the CREATE CURSOR - SQL Command.

When MAKETRANSACTABLE( ) is used to make a free table or free cursor support transactions, you can use the BEGIN TRANSACTION, END TRANSACTION, and ROLLBACK commands for the free table or free cursor. Use the ISTRANSACTABLE( ) function to determine if a free table or free cursor supports transactions.

Note

When MAKETRANSACTABLE( ) is used to make a free table or free cursor support transactions, the free table or free cursor supports transactions in all work areas and data sessions in which it is opened. MAKETRANSACTABLE( ) makes all open instances of a free table or free cursor support transactions, including those in other data sessions within a single instance of VFP.

If a free table that does not support transactions is open in more than one data session, the free table cannot be made to support transactions. However, you can open a free table that already supports transactions in additional data sessions.

If row buffering is enabled, then a table update is performed if the free table or free cursor has pending changes before the free table or free cursor is made to support transactions. You cannot use MAKETRANSACTABLE( ) to enable transactions for a free table that has table buffering enabled.

To disable transactions for a free table, you must close the free table in all data sessions.

See Also

Reference

ISTRANSACTABLE( ) Function

BEGIN TRANSACTION Command

END TRANSACTION Command

ROLLBACK Command