Showing posts with label operation. Show all posts
Showing posts with label operation. Show all posts

Wednesday, March 21, 2012

How to maintain transaction between two databases?

Hi All,

Pandon me for asking such question, I am still a beginner to ASP.NET.

I have a project that require me to do single operation that is suppose to update two databases, wonder how do I maintain transaction between these two databases? Please advise, thank you!

Are these two different databases ?? Or two different tables in a database ?

If there are two tables inside one database, then you can keep a transaction object of ADO.NET

regards

|||

They are two different database. One database in each server sitting in a WAN. =(

|||

Hi,

To use transactions across database or servers, I suggest you use the TransactionScope class.

Here is an article for your reference.

http://msdn2.microsoft.com/en-us/library/ms973865.aspx

HTH. If this does not answer your question, please feel free to mark the post as Not Answered and reply. Thank you!

sql

how to maintain database concurrence?

My application uses sql for performing operation. something like conncetion.execute(query). so there is only conncetion object no recordset object or something like that .

i want to run multiple instence of my application so i want to maintain integrety of data. and i am looking for solution through sql for locking mechanism. so concurrent data access dont currept data.

I hope you have uderstand my requirement.Avoid locking whenever possible! Use optimistic concurrency (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcoptimistic_concurrency.asp) instead of relying on locking.

-PatP