Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RollBack transaction doesn't work
Message
 
 
To
24/11/2009 08:17:50
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01436291
Message ID:
01436310
Views:
44
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform