locked
one transaction for more databases RRS feed

  • Question

  • User1049072584 posted

     Hi,

    Can I have one transaction for more databases? Is it possible? How I do it in C#?

    Thanks a lot

    Friday, February 6, 2009 8:19 AM

Answers

  • User-1199946673 posted

    Yes... it is possible. This can be achieved using TransactionScope object in C#.

    As I remembered, TransactionScope can NOT be used with JET

    If you have mulitple Access (Jet) databases, you could try to use only 1 (or create a new one), and link all tables of the other database(s) into this one. As a result, you could access all tables in multiple databases using 1 connection only, and you can use the OleDbTransaction object

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 6, 2009 9:33 AM

All replies

  • User-1085149042 posted

    Yes... it is possible. This can be achieved using TransactionScope object in C#.

     

    Friday, February 6, 2009 8:32 AM
  • User1049072584 posted

     thanks

    I'm trying it now.

    Friday, February 6, 2009 8:47 AM
  • User1024576976 posted

    You can have transaction objects for different database.

    Place each transaction object in transaction array and when you completed your required transaction then fetch each transaction object and call commit.

     

    Thanks

     

    Friday, February 6, 2009 8:59 AM
  • User-1199946673 posted

    Yes... it is possible. This can be achieved using TransactionScope object in C#.

    As I remembered, TransactionScope can NOT be used with JET

    If you have mulitple Access (Jet) databases, you could try to use only 1 (or create a new one), and link all tables of the other database(s) into this one. As a result, you could access all tables in multiple databases using 1 connection only, and you can use the OleDbTransaction object

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 6, 2009 9:33 AM
  • User-1199946673 posted

    Yes... it is possible. This can be achieved using TransactionScope object in C#.

    As I remembered, TransactionScope can NOT be used with JET

    If you have mulitple Access (Jet) databases, you could try to use only 1 (or create a new one), and link all tables of the other database(s) into this one. As a result, you could access all tables in multiple databases using 1 connection only, and you can use the OleDbTransaction object

    Friday, February 6, 2009 9:33 AM