Multiple Active Recordset

  • Hello, I need to access a resultset between another open resultset in SQL-server 2008. But it is not happening. A google search said "MultipleActiveResultSets=True" in connectionstring in web.config file will solve the problem. But it didn't for me. Can you kindly help me on how to resolve the issue? I would be very thankfull.

  • You did not say which API you are using but MARS is only available with SQL Native Client or the .net provider SQLClient. Assuming you are using one of these you can refer to this link for additional info: http://msdn.microsoft.com/en-us/library/ms131686.aspx

    Beyond that post more information regarding what is not working and some of your code so we can help you more in needed.

    The probability of survival is inversely proportional to the angle of arrival.

  • sturner (11/18/2010)


    You did not say which API you are using but MARS is only available with SQL Native Client or the .net provider SQLClient. Assuming you are using one of these you can refer to this link for additional info: http://msdn.microsoft.com/en-us/library/ms131686.aspx

    Beyond that post more information regarding what is not working and some of your code so we can help you more in needed.

    Thanks a lot. I am using .NET Framework Data Provider for SQL Server. So basically connection string, SQL command, SqlDataReader and so on. If MARS is not available for .NET Framework Data Provider than how the situation is usually dealt in this scenerio? The code is not accessible for me right now. Will try to post it once I have access to it again. But the business logic surely requires accessing/connecting a different recordset while looping within another recordset. Please let me know if you have any suggestions. Many thanks.

  • MARS is available to .NET provider and SQL Native Client as I stated. You need to enable it in the connection string, and your application code must be written so as to use it properly.

    The probability of survival is inversely proportional to the angle of arrival.

  • sturner (11/18/2010)


    MARS is available to .NET provider and SQL Native Client as I stated. You need to enable it in the connection string, and your application code must be written so as to use it properly.

    Right. Thanks. Since I have already enabled it in my connection string, than maybe my use of MARS in the code is not correct. I will verify my code again. I will post my outcome tomorrow. Many thanks.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply