odbc timeout available?

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf odbc timeout available?

  • Creator
    Topic
  • #52965
    Todd Horst
    Participant

      I have the basic tcl code to execute an odbc command, but occasionally the database will lock up because of a query from another server. When this happens, the thread making a query to that database will also appear to hang.

      It isn’t actually hung, when the database becomes free again the thread will pick right up and go along. This may sound good, until i tell you the db can be locked for 30 minutes. And the thread is a high volume thread.

      I know we need to look at resources on the db server, but in the meantime is there a way to set the timeout out on either the connection or more preferably the query being made?

    Viewing 0 reply threads
    • Author
      Replies
      • #76098
        Todd Horst
        Participant

          Code:

          odbc SQLSetStmtAttr $temp_hstmt SQL_ATTR_QUERY_TIMEOUT $settings(timeout) 0

          The above code will timeout after a set time

      Viewing 0 reply threads
      • The forum ‘Cloverleaf’ is closed to new topics and replies.