dbTalk Databases Forums  

Rollback problem with .net Transaction support

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss Rollback problem with .net Transaction support in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
srsanchez75@googlemail.com
 
Posts: n/a

Default Rollback problem with .net Transaction support - 09-17-2009 , 07:29 AM






We're using the ado.net provider for SQL Anywhere 10.0.1 and call
stored procedures. Although our stored procedure already encapsulates
an insert in a transaction, the c# routine that calls the procedures
encapsulate the stored procedure calls again using a .net
SATransaction object. Our problem is that calling the Rollback()
method does not rollback the transaction, i.e. the inserted record is
still in the DB. This is unwanted for our integration tests, since we
want to rollback all changes after our tests succeed so that we can
have reproduceable tests. Is there any known problem with
SATransaction we should be aware of?

Reply With Quote
  #2  
Old   
Reg Domaratzki [Sybase iAnywhere]
 
Posts: n/a

Default Re: Rollback problem with .net Transaction support - 09-17-2009 , 08:33 AM






srsanchez75 (AT) googlemail (DOT) com wrote:
Quote:
We're using the ado.net provider for SQL Anywhere 10.0.1 and call
stored procedures. Although our stored procedure already encapsulates
an insert in a transaction, the c# routine that calls the procedures
encapsulate the stored procedure calls again using a .net
SATransaction object. Our problem is that calling the Rollback()
method does not rollback the transaction, i.e. the inserted record is
still in the DB. This is unwanted for our integration tests, since we
want to rollback all changes after our tests succeed so that we can
have reproduceable tests. Is there any known problem with
SATransaction we should be aware of?
I'm not sure I understand your question. Are you saying that you have a
stored procedure that has a commit in it ("already encapsulates an
insert in a transaction"), but after you call the stored procedure you
want to be able to execute a rollback and undo the operation that was
committed in the stored procedure?

--
Reg Domaratzki, Sybase iAnywhere Solutions
Please reply only to the newsgroup

Documentation : Exercise your WRITE @DocCommentXchange: DCX.sybase.com
SQL Anywhere Patches and EBFs : http://downloads.sybase.com/swd/base.do
-> Choose SQL Anywhere
-> Optionally set filter to "Display ALL platforms IN ALL MONTHS"

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.