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. ADO.NET Query Timeout

ADO.NET Query Timeout

Scheduled Pinned Locked Moved Database
databasesql-serverquestioncsharpgame-dev
2 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.
  • A Offline
    A Offline
    afronaut
    wrote on last edited by
    #1

    Hey all, we've got a monster proc that does things like the following -- create tmp table -- for all fields in permanent table -- for all parties involved -- select somebig calculation -- update tmp table -- next party -- update permanent table w/ tmp value -- next field It takes a little over 3000 lines of TSQL to get the whole thing done. What really sucks is that I need to call this from a web page (*.aspx) and allow our client to view the results of this procedure. Eventually this will be a moot issue because it will run as a nightly job in Sql Server but while they test that it works I need to make sure that it runs smoothly from an aspx page. Here are my questions: 1. What is the maximum timeout I can apply to both the SqlCommand and SqlConnection objects? 2. Can I run this in a separate process and do a callback to the aspx page to display results? Airline websites tend to do this quite a bit when you're looking for a flight. I'm thinking of using an asynchronous delegate but I'd have to guess how long it would take before redirecting the user to the results... 3. Any ideas on how I can get this to run smoothly and not worry about timeouts? Thanks much, *->>Always working on my game, teach me *->>something new. cout << "dav1d\n";

    M 1 Reply Last reply
    0
    • A afronaut

      Hey all, we've got a monster proc that does things like the following -- create tmp table -- for all fields in permanent table -- for all parties involved -- select somebig calculation -- update tmp table -- next party -- update permanent table w/ tmp value -- next field It takes a little over 3000 lines of TSQL to get the whole thing done. What really sucks is that I need to call this from a web page (*.aspx) and allow our client to view the results of this procedure. Eventually this will be a moot issue because it will run as a nightly job in Sql Server but while they test that it works I need to make sure that it runs smoothly from an aspx page. Here are my questions: 1. What is the maximum timeout I can apply to both the SqlCommand and SqlConnection objects? 2. Can I run this in a separate process and do a callback to the aspx page to display results? Airline websites tend to do this quite a bit when you're looking for a flight. I'm thinking of using an asynchronous delegate but I'd have to guess how long it would take before redirecting the user to the results... 3. Any ideas on how I can get this to run smoothly and not worry about timeouts? Thanks much, *->>Always working on my game, teach me *->>something new. cout << "dav1d\n";

      M Offline
      M Offline
      Michael Potter
      wrote on last edited by
      #2

      I know this is not what you have asked but: Have you tried removing the need for a cursor? Cursors are "very" rarely needed. It has been my experience that changing cursors to properly indexed set operations removes any significant time-out issues.

      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