Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Client App hangs up while server in Transaction Expand / Collapse
Author
Message
Posted Sunday, February 24, 2008 11:42 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Sunday, May 25, 2008 12:13 AM
Points: 12, Visits: 39
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
Post #459570
Posted Monday, February 25, 2008 12:55 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Sunday, May 25, 2008 12:13 AM
Points: 12, Visits: 39

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.
Post #459585
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse