AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Administrar bases de datos / HFSQL / Funciones HFSQL
  • Error cases
  • Handling records during a transaction
  • Transactions and independent HFSQL context
  • OLE DB and Native Connectors
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Validates the current transaction:
Ejemplo
MyConnection1 is Connection
// Start transaction on data files associated with MyConnection1
MyConnection1.TransactionStart()
// Code used to prepare the order to added
// ...
WHEN EXCEPTION IN
	// Add the order
	Order.Add() 
	// Validate the addition
	MyConnection1.TransactionEnd()
DO
	// Delete the order lines
	MyConnection1.TransactionCancel()
END
Sintaxis

Validar una transacción en curso en una conexión Ocultar los detalles

<Result> = <Connection>.TransactionEnd()
<Result>: Booleano
  • True if the transaction is ended,
  • False if a problem occurs. HErrorInfo returns more details about the error.
Caution: If a global transaction is started, the function does nothing.. The syntax 2 must be used.
<Connection>: Variable de tipo Connection
Name of the Connection variable that describes the connection to use.

Validar una transacción global en curso Ocultar los detalles

<Result> = TransactionEnd()
<Result>: Booleano
  • True if the transaction is ended,
  • False if a problem occurs. HErrorInfo returns more details about the error.
Observaciones

Error cases

  • Transaction nesting: it is not possible to nest transactions (i.e. to call function <variable Connection>.TransactionStart or function <Variable Connection>.Transaction within a transaction).. In this case, error 70031 occurs.
  • A fatal error is displayed in the following cases:
    • A transaction is started on all the connections while there is at least one connection in transaction.
    • A transaction is started on a connection while a transaction was already started on all the connections.
    • A transaction is started on all the connections while there is at least one connection whose isolation level is not "Read Uncommitted".

Handling records during a transaction

During a transaction, some rules must be complied with when handling the records. For more details, see Transactions: Handling the records during a transaction.

Transactions and independent HFSQL context

When copying a context, if a transaction is in progress on the first context, the new context is not in transaction. You must call <variable Connection>.TransactionStart (or <Variable Connection>.Transaction) to start a transaction in the new context.
WINDEVOLE DBConectores Nativos

OLE DB and Native Connectors

Only syntaxes with connection are taken into account by the Native Connectors (also called Native Accesses) that support transactions. You can also use SQLTransaction.
Componente: wd300hf.dll
Versión mínima requerida
  • Versión 25
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 22/11/2024

Señalar un error o enviar una sugerencia | Ayuda local