Transactions over web services

TypeSH

Newcomer
Joined
Nov 16, 2004
Messages
1
Maybe I am missing something here that someone can help me out with. I have a web service that is handling all the queries to a database. I have a sub if I am doing a executenonquery and a different function that returns a dataset. The problem is that I don’t see how I can have a transaction that consists of multiple calls to this function and sub procedure since an object does not persist between calls to the web service. What is the best way to handle transactions with web services?
 
I never did that but I think you're doing it wrong in my point of view...

I have a sub if I am doing a executenonquery and a different function that returns a dataset.
Instead of 2 methods, one to send the message and the other to receave the result, why don't you use an async delegate?

I don’t see how I can have a transaction that consists of multiple calls to this function and sub procedure since an object does not persist between calls to the web service.
Assuming the async delegate method, if one call was made, the transaction must be between the WS and the DB, the user should only get the result on the callback.
This way, you can even lock the database on a delegate "thread", cause if another user/thread tries to use it, it will fail.
The only thing you must do is handle the behaviours. If the DB is locked or you wait or you return nothing as an error...

Alex :p
 
Back
Top