clearquest

Clearquest Database Timeout


I have a tool that is setup to query our Clearquest Database to return information to the user automatically every 9000 milliseconds. I came in today and the connection had timed out over the weekend, I found in the oSession object a "check heartbeat" function, but I'm not sure that is what I want to use to determine if i need to "re-login", I saw a db.timeoutinterval, but I can't seem to find any good reference on how to call it, since the oSession Object doesn't actually call it, and any references in the API guide mention it with regard to actually creating the db using the adminsession object. What "object" do I need to create to access the timeout interval and how? Thank you for the help! Or is it better to use the "check heartbeat function" and will it return a true or false depending on current state of login?


Solution

  • Well to make a long story short, I don't have a clue what checkheartbeat actually does, but before I try to do some clearquest stuff (queries and the like) I make a call with my oSession object. I'm not certain if the checkheartbeat will return a boolean if the session has expired, or not, so I put it in a try catch block

    Try
       If Not oSession.CheckHeartbeat Then
          'insert login function here
          MsgBox("Had to re-login false Heartbeat")
       End If
    Catch ex As Exception
        'insert login function here
        MsgBox("Had to re-login Exception style")
    End Try
    

    Thus far I haven't had a timeout, so I've been unable to truly test this out. If the time comes that I have a timeout. Then I'll update what I find out.