Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is the possible solution?

Status
Not open for further replies.
Nov 5, 2004
27
PH
I a message appears "Timeout expired" everytime I create a transaction in the Purchasing System that is develop using VB 6.0 and the backend is sql server 2000.What is the possible cause and how can i fix it?
 
the problem is that the timeout setting of sql server would be lesser than the amount of time the transaction takes thru your vb program. it is possible to change the timeout settings of sql server. i'll give you a code given in sql query analyser's help section
********************************************
Example
Use the following code to set the Timeout property for a server. You must call the Update method for your changes to take effect.

Dim dsoS As New DSO.Server

' Connect to the local Analysis server.
dsoServer.Connect "LocalHost"

' Set the timeout to 4 hours.
dsoServer.Timeout = 14400
' Update the Analysis server.
dsoServer.Update

' Close the connection to the Analysis server.
dsoServer.CloseServer

**********************************************

try this code to change timeout settings

or browse thru query analysers help for more information

 
The error implies that the sql stement in the VB application has taken longer than the time allowed by the application, by default this is 30 seconds. There can be many causes - poor database design, slow network, large amounts of data, deadlocks, error in the program code, under spec hardware and more.

Cant give any specific answers how to fix it without knowing the cause but heres a few suggestions -

Debug the code to identify the problem area and maybe post the relevant VB code.

Run the SQL Profiler may help to identify the problem area.

Check you have installed latest service packs for the OS, SQL server and MDAC.







 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top