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. General Programming
  3. Visual Basic
  4. VB6.0 timeout accessing SQL Server

VB6.0 timeout accessing SQL Server

Scheduled Pinned Locked Moved Visual Basic
databasesql-serversysadminquestion
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.
  • J Offline
    J Offline
    jgrogan
    wrote on last edited by
    #1

    I have a number of stored procs in SQL Server that I call from my VB code. Some of them can take up to 2 hours to run and I am getting timeout errors in VB. Is there a way to extend the timeout interval or even switch it off for these stored procs (returning to defaults after the proc has run)? Thanks in advance, John.

    D 1 Reply Last reply
    0
    • J jgrogan

      I have a number of stored procs in SQL Server that I call from my VB code. Some of them can take up to 2 hours to run and I am getting timeout errors in VB. Is there a way to extend the timeout interval or even switch it off for these stored procs (returning to defaults after the proc has run)? Thanks in advance, John.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Not for two hours, no. A much better solution would be to fire off a scheduled job on the SQL server and when it completes, use SQL's Notification Services to alert your VB app that it completed, if it's still running that is. Or some other disconnected solution. The reason being is that you can't trust the VB app, or the machine it's running on for that matter, to stay running for that entire time. A power failure would result in a bad situation if your app must be counted on to be running the entire time.

      Dave Kreskowiak Microsoft MVP - Visual Basic

      J 1 Reply Last reply
      0
      • D Dave Kreskowiak

        Not for two hours, no. A much better solution would be to fire off a scheduled job on the SQL server and when it completes, use SQL's Notification Services to alert your VB app that it completed, if it's still running that is. Or some other disconnected solution. The reason being is that you can't trust the VB app, or the machine it's running on for that matter, to stay running for that entire time. A power failure would result in a bad situation if your app must be counted on to be running the entire time.

        Dave Kreskowiak Microsoft MVP - Visual Basic

        J Offline
        J Offline
        jgrogan
        wrote on last edited by
        #3

        Thanks Dave. I hadn't thought of that angle. I'll give your suggestion a go. John.

        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