Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Problem in Query Timeout

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-01-17 : 10:13:17
Beena writes "Hello,
I am a vb developer and I am facing one problem in one of my prohect in Vb+MS-SQL server 7.0. In some stored procedures afrter sometime manytime server replys "-2147217871[Microsoft] [ODBC SQL Server Driver] Timeout expired ". In SQL server Database propwety-->Connection-->Remote Server Connection--> Query time-out (Sec.,0=unlimited). I have set this property to 0 and check the Stored procedure again and again heting same result everytime. If you can help me to solve this problem I will be thankful to you.

Thanking you,

Beena Desai"

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-01-17 : 23:58:07
If the VB application is running in different computer, then check for the speed of the network. If there is problem then this error may occur. Check the query written in the SP and try to optimize it

Madhivanan
Go to Top of Page

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2005-01-18 : 20:11:43
I would greatly advise against setting an unlimited timeout. SQL Server queries generally return in fractions of a second or maybe a couple seconds for slightly more complex ones, and rarely over 20 seconds (which I think is the default timeout for a Connection object. If something is taking longer than 20 seconds, then there is either something very, very wrong with the query, or it is something that should not be performed ad-hoc like that.

Can you run the actual SQL statement from Query Analyzer? That will help tell you whether it is the query that is the problem or something else in your application.

---------------------------------------------------------------------------------
Infoneering: Information Technology solutions engineered to professional standards.
Go to Top of Page

ruan4u
Posting Yak Master

132 Posts

Posted - 2005-01-19 : 06:35:42
I have had the same exact problem.QA takes 2 secs,but from VB times out.I increased the timeout from 30 to 120 it worked.why does this happen?
Go to Top of Page

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2005-01-19 : 16:56:03
Connectivity issues between the two computers? Performance issues on the application PC? Command, Connection, and Recordset objects not properly closed and destroyed?

---------------------------------------------------------------------------------
Infoneering: Information Technology solutions engineered to professional standards.
Go to Top of Page
   

- Advertisement -