Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. How to maintain isolation level in MSSQL SERVER 2000?

How to maintain isolation level in MSSQL SERVER 2000?

Scheduled Pinned Locked Moved Database
helpcsharpasp-netdatabasesql-server
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    param thaker
    wrote on last edited by
    #1

    Hi Friends, My problem is that , my application is using common transaction object , when multiple users trying to access the application resources simultaneously it will show me the error datareader is already opened . Can anybody suggest me , how to maintain these problem? My application is using ASP.NET as front-end. Could it be maintained by maintaining isolation/concurrency in database? Please , reply your suggestions. Thanking you in advance, Param

    param

    M 1 Reply Last reply
    0
    • P param thaker

      Hi Friends, My problem is that , my application is using common transaction object , when multiple users trying to access the application resources simultaneously it will show me the error datareader is already opened . Can anybody suggest me , how to maintain these problem? My application is using ASP.NET as front-end. Could it be maintained by maintaining isolation/concurrency in database? Please , reply your suggestions. Thanking you in advance, Param

      param

      M Offline
      M Offline
      Mike Dimmick
      wrote on last edited by
      #2

      Best practice is to use a separate connection for every logical database query (if you have a lot of queries in the same function, it's fine to use the same connection for all of them, but you shouldn't use the same connection object in different functions). Ensure that you Dispose the connections when you've finished with them. ADO.NET has connection pooling support which is enabled by default. This will avoid the overhead of connecting unless there are no free connections in the pool. Your error is occurring because another thread, processing another request, already has a DataReader open on the connection, and that's not allowed.

      Stability. What an interesting concept. -- Chris Maunder

      P 1 Reply Last reply
      0
      • M Mike Dimmick

        Best practice is to use a separate connection for every logical database query (if you have a lot of queries in the same function, it's fine to use the same connection for all of them, but you shouldn't use the same connection object in different functions). Ensure that you Dispose the connections when you've finished with them. ADO.NET has connection pooling support which is enabled by default. This will avoid the overhead of connecting unless there are no free connections in the pool. Your error is occurring because another thread, processing another request, already has a DataReader open on the connection, and that's not allowed.

        Stability. What an interesting concept. -- Chris Maunder

        P Offline
        P Offline
        param thaker
        wrote on last edited by
        #3

        Hi Thanks for your reply. But, I have closed the connection n used seperate connection foe every logical database query..but in my code i have used common transaction object for every query..will it create any problem? becoz every time wen multi user are accessing the system random error are comings.sometime it gives internal fatal error.some time it gives ur reader is opened with this connection.I am very sure tht i have close the connection n the data reader both. I wud be very pleased if u can give some solution to this problem Thanking you in advance Param

        param

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups