locked
need a solution for the error RRS feed

  • Question

  • User-191519477 posted

    I'm trying to connect .net + C# code with MYSQL DB server, by defining Connectionstring based on provider name from web.config file, without defining any MySql based code in source code..

    DB Connection got open and while executing 'resultSet = db.ExecuteDataSet(command);' , getting an error

    'Multiple simultaneous connections or connections with different connection strings inside the same transaction are not currently supported.'

    Can anybody explain, why the error particularly in that line of code and how can i solve it ??

    Tuesday, July 2, 2013 8:28 AM

Answers

  • User281315223 posted

    Could you the entire code that you are using for this?

    If you are performing multiple database calls through multiple different connections, I would recommend seperating each of the calls into their own connections : 

    using(MySqlConnection connectionA = new MySqlConnection("Your Connection String for A"))
    {
           //Open your connection and execute your code
    }
    using (MySqlConnection connectionB = new MySqlConnection("Your Connection String for B"))
    {
           //Open your connection and execute your code
    }
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, July 2, 2013 9:07 AM
  • User-191519477 posted

    Hey sorry guys, My error got fixed.. Thanks..

    I just make AutoEnlist=false in my connection string configuration. It works..

    Thanks..

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, July 2, 2013 10:52 PM

All replies

  • User2060565753 posted

    show ur code

     

    Also use the using statments when playing with connections

    Tuesday, July 2, 2013 9:04 AM
  • User281315223 posted

    Could you the entire code that you are using for this?

    If you are performing multiple database calls through multiple different connections, I would recommend seperating each of the calls into their own connections : 

    using(MySqlConnection connectionA = new MySqlConnection("Your Connection String for A"))
    {
           //Open your connection and execute your code
    }
    using (MySqlConnection connectionB = new MySqlConnection("Your Connection String for B"))
    {
           //Open your connection and execute your code
    }
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, July 2, 2013 9:07 AM
  • User-191519477 posted

    Hey sorry guys, My error got fixed.. Thanks..

    I just make AutoEnlist=false in my connection string configuration. It works..

    Thanks..

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, July 2, 2013 10:52 PM
  • User1815411410 posted

    It is good to know that the issue has been solved

     

     

    Thursday, July 4, 2013 11:39 PM
  • User-191519477 posted

    hey dyyo, Thanks for your response.. But making auto enlisting false, transaction process will not work.. I need a clarification whether there is any solution for an issue, By deployment app server and DB server were different so the transaction process escalates DTC of app server..

    Friday, July 5, 2013 6:21 AM
  • User-166373564 posted

    Hi,

    'Multiple simultaneous connections or connections with different connection strings inside the same transaction are not currently supported.'

    MySQL supports multiple connection transactions in single connection string, but it can’t support multiple connection transactions in multiple database transactions, please check whether you use it properly,

    hope it helps you,

    Regards

    Monday, July 8, 2013 4:16 AM