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. Invalidated ADO Connection Object

Invalidated ADO Connection Object

Scheduled Pinned Locked Moved Database
sysadminhelptutorialquestion
4 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
    alex1205
    wrote on last edited by
    #1

    Hi, Anybody knows how to know if an ADO connection has been disconnected even before you execute anything? I have an application which has a global connection object and when it was disconnected from the server for whatever reason, it raises an error when you execute something even if the connection has been restored. Is there a way which I could know if the connection is still valid before I even execute anything? Thanks SDE

    S 1 Reply Last reply
    0
    • A alex1205

      Hi, Anybody knows how to know if an ADO connection has been disconnected even before you execute anything? I have an application which has a global connection object and when it was disconnected from the server for whatever reason, it raises an error when you execute something even if the connection has been restored. Is there a way which I could know if the connection is still valid before I even execute anything? Thanks SDE

      S Offline
      S Offline
      S Douglas
      wrote on last edited by
      #2

      alex1205 wrote:

      know if an ADO connection has been disconnected even before you execute anything?

      You can check the connection state. State Property (ADO)[^]


      DEBUGGING : Removing the needles from the haystack.

      A 1 Reply Last reply
      0
      • S S Douglas

        alex1205 wrote:

        know if an ADO connection has been disconnected even before you execute anything?

        You can check the connection state. State Property (ADO)[^]


        DEBUGGING : Removing the needles from the haystack.

        A Offline
        A Offline
        alex1205
        wrote on last edited by
        #3

        Hi, Thanks for the response. I've tried that and it doesn't work. I also tried looking at the error count but it doesn't report any. :) SDE

        S 1 Reply Last reply
        0
        • A alex1205

          Hi, Thanks for the response. I've tried that and it doesn't work. I also tried looking at the error count but it doesn't report any. :) SDE

          S Offline
          S Offline
          S Douglas
          wrote on last edited by
          #4

          alex1205 wrote:

          Thanks for the response. I've tried that and it doesn't work.

          Oh, sorry about that. I take it the Connection State is showing the connection is still active?

          alex1205 wrote:

          it raises an error when you execute something even if the connection has been restored.

          In the original post you mention the next time you execute a query it throws an error. What is the error message it throws when this happens?


          DEBUGGING : Removing the needles from the haystack.

          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