Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RollBack transaction doesn't work
Message
 
 
À
24/11/2009 08:17:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01436291
Message ID:
01436310
Vues:
49
>Hi,
>
>From VFP i'm persisting data into SQLServer, but roolback transaction dont work
>
>
>objConexao.executar("BEGIN TRANSACTION")
>objConexao.executar("Update TableName set fieldname = 11 where fieldkey = 289880")
>objConexao.executar("ROLLBACK TRANSACTION") && dont work - in SQLServer fieldname was updated to 11
>
You should pass all 3 commands at once, e.g.
text to lcUpdate noshow
   BEGIN TRANSACTION
  Update TableName set fieldname = 11 where fieldkey = 289880
  ROLLBACK TRANSACTION
endtext

objConexao.executar(lcUpdate)
This way they will execute as one batch.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform