Client App hangs up while server in Transaction

  • Hi,

    I have a client app in VB6 requesting for server data each 5secs.

    Sometimes when the server is in the middle of transaction, the client app hangs up. I want the client App to return after 2 secs instead of waiting till the server transaction gets committed.

    below is the code.

    The SP is accessing a linked server.

    CD.CommandTimeout = 2

    CD.CommandText = "spGetInvoice"

    Set P1 = CD.CreateParameter(, adInteger, adParamInput, 4, Val(Mid(TerminalID, 2)))

    CD.Parameters.Append P1

    Set P2 = CD.CreateParameter(, adVarChar, adParamInput, 25, POSname)

    CD.Parameters.Append P2

    Set rs = CD.Execute

    Am I doing the right way ?

    can anybody help please,

    thanks in advance, Thomas

  • Hi,

    I have found a solution myself.

    We can do this while configuring the Linked server

    Linked Server Properties -> Server Options -> Query Timeout

    thanks all.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply