none
Transactions accross multiple data sources RRS feed

  • Question

  • Is it possible to have a perform a transaction accross multiple data sources using a SqlTransaction? I noticed that this can be done using TransactionScope but since i'm working with the Compact Framework, I don't have access to the System.Transactions namespace.

    Thanks,
    Jordan
    Friday, July 11, 2008 2:45 PM

Answers

  • You are correct. System.Transactions allows you to perform a transaction across different data sources, and SqlTransaction only to SQL Server (and then, only in the same connection). So the scenario you are trying to accomplish is not possible in the Compact Framework.

     

    A potential solution would be for your CF app to call a Web Service; the ASP.Net Web service would have access to System.Transactions, if that is the right solution for your problem.

     

    Bruno

     

    Sunday, July 13, 2008 3:22 AM

All replies

  • I don't think there is a Distributed Transaction Coordinator available. You need to control the transactions by yourself.
    Friday, July 11, 2008 6:46 PM
  • What is your definition of multiple data sources? Is it multiple databases?

     

    Friday, July 11, 2008 11:09 PM
    Moderator
  • Yes.
    Saturday, July 12, 2008 3:43 PM
  • You are correct. System.Transactions allows you to perform a transaction across different data sources, and SqlTransaction only to SQL Server (and then, only in the same connection). So the scenario you are trying to accomplish is not possible in the Compact Framework.

     

    A potential solution would be for your CF app to call a Web Service; the ASP.Net Web service would have access to System.Transactions, if that is the right solution for your problem.

     

    Bruno

     

    Sunday, July 13, 2008 3:22 AM