Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CA & Transasções
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
CA & Transasções
Miscellaneous
Thread ID:
00924318
Message ID:
00924318
Views:
59
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
Next
Reply
Map
View

Click here to load this message in the networking platform