Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Conexión con bases de datos
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Conexión con bases de datos

 
 
Herramientas Buscar en Tema Desplegado
  #3  
Antiguo 31-08-2011
Avatar de Casimiro Noteví
Casimiro Noteví Casimiro Noteví is offline
Merodeador
 
Registrado: sep 2004
Ubicación: En algún lugar.
Posts: 32.671
Poder: 10
Casimiro Noteví Tiene un aura espectacularCasimiro Noteví Tiene un aura espectacular
En la web de fibplus puedes descargar unos tutoriales (FIBplus devguide1.pdf y FIBplus devguide2.pdf), en uno de ellos dice:

Cita:
Working with transactions
A transaction is an operation of database transfer from one consistent state to another.
All operations with the dataset (data/metadata changes) are done in the context of a
transaction. To understand special FIBPlus features completely you need to know about
InterBase / FIBPlus transactions. Please read the topic «Working with Transaction» in
ApiGuide.pdf for InterBase.
All the changes done in the transaction can be either committed (in case there are no errors) by
Commit or rolled back (Rollback). Besides these basic methods TpFIBTransaction has their
context saving analogues: CommitRetaining and RollbackRetaining, i.e. on the client side, these
will not close a TpFibQuery or TpFibDataset.
To start the transaction you should call the StartTransaction method or set the Active property
to True. To commit the transaction call Commit/CommitRetaing, to roll it back -
Rollback/RollbackRetaining.
TpFIBQuery and TpFIBDataSet components have some properties which help to control
transactions automatically. In particular they are: the TpFIBDataSet.AutoCommit property; the
poStartTransaction parameter in TpFIBDataSet.Options; qoStartTransaction and
qoCommitTransaction in TpFIBQuery.Options.
How to set transaction parameters
Transaction parameters are not a trivial topic and require much explanation, so FIBPlus
DevGuide won’t cover the subject in detail. We highly recommend you to read InterBase
ApiGuide.pdf to understand how transactions work.
Nevertheless in most cases you do not need to know about all peculiarities of transaction control
at the API level. FIBPlus has a number of mechanisms which help developers’ work easier. I.e.
TpFIBTransaction has three basic transaction types: tpbDefault, tpbReadCommited,
tpbRepeatableRead. At design time you can also create special types of your own in the
TpFIBTransaction editor and use them as internal ones. Set the transaction type to set its
parameters::
TpbDefault – parameters must be set in TRParams
tbpReadCommited – shows the ReadCommited isolation level
tbpRepeatableRead – shows the RepeatableRead isolation level
Planning to use transactions in the application
Efficient InterBase/Firebird applications depend heavily on correct transaction use. In a multi-
generation architecture (record versioning) Update transactions retain record versions.
So in general try to make the Update transactions as short as possible. Read-only transactions
can remain open because they do not retain versions.
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Ibx a FibPlus raistware Conexión con bases de datos 6 05-01-2007 14:21:53
FIBPlus emeritos Lazarus, FreePascal, Kylix, etc. 3 19-06-2004 16:56:40
FibPlus Malon Conexión con bases de datos 4 22-04-2004 01:41:49
IBX, IBO, Fibplus raul_sal Conexión con bases de datos 6 04-06-2003 00:50:45
FibPlus y las Dll Erik_Magnus Firebird e Interbase 0 23-05-2003 06:44:25


La franja horaria es GMT +2. Ahora son las 20:38:30.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi