Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CA & Transasções
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
CA & Transasções
Divers
Thread ID:
00924318
Message ID:
00924318
Vues:
61
Estou usando o CA e SQL Server, e querendo executar um ROLLBACK

Mesmo emitindo um
SET MULTLOCKS ON
=CURSORSETPROP('Buffering,5)
Begin Transaction

   Comandos...
   lUp = TableUpdate(.T.)
   comandos..
   lUp = TableUpdate(.T.)
   update
   lUp = TableUpdate(.T.)
   replacae
   lUp = TableUpdate(.T.)
   etc...

ROLLBACK  && Não executa
Quando este mesmo codigo em tabelas do VFP funciona, perfeitamente. O SQL Server não trabalha com as transações do VFP ?

Para funcionar estou guardando o Objecto Connection do meu CA, em uma propriedade da _screen

e usando :
_screen.oConn.BeginTrans
   Comandos...
   lUp = TableUpdate(.T.)
   comandos..
   lUp = TableUpdate(.T.)
   update
   lUp = TableUpdate(.T.)
   replacae
   lUp = TableUpdate(.T.)
   etc...

_screen.oConn.RollbackTrans
Esta é a forma correta de se trabalhar ?
Paulo Cesar Carneiro
desenvolvimento@controplan.com.br


"My God, what have we done?"
-- Capt. Robert Lewis, co-pilot of the Enola Gay, recalling the moment the atomic bomb exploded over Hiroshima

At 8:15 a.m. on August 6 1945
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform